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:
Kevin Bullaughey
2014-09-21 07:52:17 -04:00
parent 34d684ee9a
commit edfd38bdee
5 changed files with 25 additions and 26 deletions

View File

@@ -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