mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Stores passed in options in array serializers
This is supported in single serializers. This adds support for passing options from array serializers to each serializer in it.
This commit is contained in:
4
test/fixtures/poro.rb
vendored
4
test/fixtures/poro.rb
vendored
@@ -78,6 +78,10 @@ PostSerializer = Class.new(ActiveModel::Serializer) do
|
||||
def blog
|
||||
Blog.new(id: 999, name: "Custom blog")
|
||||
end
|
||||
|
||||
def custom_options
|
||||
options
|
||||
end
|
||||
end
|
||||
|
||||
SpammyPostSerializer = Class.new(ActiveModel::Serializer) do
|
||||
|
||||
Reference in New Issue
Block a user