mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Rename method to serializable_object
This commit is contained in:
committed by
Santiago Pastorino
parent
f14f931957
commit
0f4547eb77
@@ -169,12 +169,12 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
def serializable_hash(options={})
|
||||
def serializable_object(options={})
|
||||
return nil if object.nil?
|
||||
hash = attributes
|
||||
hash.merge! associations
|
||||
@options[:_wrap_in_array] ? [hash] : hash
|
||||
end
|
||||
alias_method :serializable_object, :serializable_hash
|
||||
alias_method :serializable_hash, :serializable_object
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user