mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Fix spelling mistakes
This commit is contained in:
parent
cbd7d7d385
commit
f01fe14972
@ -220,7 +220,7 @@ module ActiveModel
|
||||
option :polymorphic
|
||||
end
|
||||
|
||||
def polymoprhic_key
|
||||
def polymorphic_key
|
||||
associated_object.class.to_s.demodulize.underscore.to_sym
|
||||
end
|
||||
|
||||
@ -236,7 +236,7 @@ module ActiveModel
|
||||
object = associated_object
|
||||
|
||||
if object && polymorphic?
|
||||
{ polymoprhic_key => find_serializable(object).serializable_hash }
|
||||
{ polymorphic_key => find_serializable(object).serializable_hash }
|
||||
elsif object
|
||||
find_serializable(object).serializable_hash
|
||||
end
|
||||
@ -252,7 +252,7 @@ module ActiveModel
|
||||
object = associated_object
|
||||
|
||||
if object && polymorphic?
|
||||
{ polymoprhic_key => object.read_attribute_for_serialization(:id) }
|
||||
{ polymorphic_key => object.read_attribute_for_serialization(:id) }
|
||||
elsif object
|
||||
object.read_attribute_for_serialization(:id)
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user