mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Implement has_many
This commit is contained in:
@@ -47,6 +47,16 @@ module ActiveModel
|
||||
name
|
||||
end
|
||||
end
|
||||
|
||||
class HasMany < Association
|
||||
def key
|
||||
"#{name.singularize}_ids"
|
||||
end
|
||||
|
||||
def embedded_key
|
||||
name
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user