mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 23:33:12 +00:00
converted has many to use string key for association, makeing it compatable with has_one; fixed tests that relied on symbol keys for has_many associations
This commit is contained in:
@@ -49,9 +49,9 @@ module ActiveModel
|
||||
'ar_tag_ids' => [1, 2],
|
||||
'ar_section_id' => 1
|
||||
},
|
||||
ar_comments: [{ body: 'what a dumb post', 'ar_tag_ids' => [3, 2] },
|
||||
'ar_comments' => [{ body: 'what a dumb post', 'ar_tag_ids' => [3, 2] },
|
||||
{ body: 'i liked it', 'ar_tag_ids' => [3, 1] }],
|
||||
ar_tags: [{ name: 'happy' }, { name: 'whiny' }, { name: 'short' }],
|
||||
'ar_tags' => [{ name: 'happy' }, { name: 'whiny' }, { name: 'short' }],
|
||||
'ar_sections' => [{ 'name' => 'ruby' }]
|
||||
}, post_serializer.as_json)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user