mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix tests to comply with the JSON API spec.
This commit is contained in:
5
test/fixtures/poro.rb
vendored
5
test/fixtures/poro.rb
vendored
@@ -227,8 +227,9 @@ end
|
||||
VirtualValueSerializer = Class.new(ActiveModel::Serializer) do
|
||||
attributes :id
|
||||
|
||||
has_many :reviews, virtual_value: [{ id: 1 }, { id: 2 }]
|
||||
has_one :maker, virtual_value: { id: 1 }
|
||||
has_many :reviews, virtual_value: [{ type: 'reviews', id: '1' },
|
||||
{ type: 'reviews', id: '2' }]
|
||||
has_one :maker, virtual_value: { type: 'makers', id: '1' }
|
||||
|
||||
def reviews
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user