mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Use association value for determining serializer used
Ensures overridden association value works when orignal association does not return a result.
This commit is contained in:
@@ -159,7 +159,10 @@ module ActionController
|
||||
id: 1,
|
||||
body: 'ZOMG A COMMENT' }
|
||||
],
|
||||
blog: nil,
|
||||
blog: {
|
||||
id: 999,
|
||||
name: 'Custom blog'
|
||||
},
|
||||
author: {
|
||||
id: 1,
|
||||
name: 'Joao Moura.'
|
||||
@@ -190,7 +193,10 @@ module ActionController
|
||||
id: 1,
|
||||
body: 'ZOMG A COMMENT' }
|
||||
],
|
||||
blog: nil,
|
||||
blog: {
|
||||
id: 999,
|
||||
name: 'Custom blog'
|
||||
},
|
||||
author: {
|
||||
id: 1,
|
||||
name: 'Joao Moura.'
|
||||
|
||||
Reference in New Issue
Block a user