mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Distinguish options ivar from local; Extract latent Adapter::CachedSerializer
This commit is contained in:
6
test/fixtures/poro.rb
vendored
6
test/fixtures/poro.rb
vendored
@@ -60,7 +60,7 @@ class ProfileSerializer < ActiveModel::Serializer
|
||||
attributes :name, :description
|
||||
|
||||
def arguments_passed_in?
|
||||
options[:my_options] == :accessible
|
||||
instance_options[:my_options] == :accessible
|
||||
end
|
||||
end
|
||||
|
||||
@@ -102,7 +102,7 @@ PostSerializer = Class.new(ActiveModel::Serializer) do
|
||||
end
|
||||
|
||||
def custom_options
|
||||
options
|
||||
instance_options
|
||||
end
|
||||
end
|
||||
|
||||
@@ -123,7 +123,7 @@ CommentSerializer = Class.new(ActiveModel::Serializer) do
|
||||
belongs_to :author
|
||||
|
||||
def custom_options
|
||||
options
|
||||
instance_options
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user