mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Drop reference to self
This commit is contained in:
parent
80ff5ebc5a
commit
1c9ab8fd24
@ -66,7 +66,7 @@ module ActionController
|
|||||||
|
|
||||||
if serializer = options.fetch(:serializer, ActiveModel::Serializer.serializer_for(resource))
|
if serializer = options.fetch(:serializer, ActiveModel::Serializer.serializer_for(resource))
|
||||||
options[:scope] = serialization_scope unless options.has_key?(:scope)
|
options[:scope] = serialization_scope unless options.has_key?(:scope)
|
||||||
options[:resource_name] = self.controller_name if resource.respond_to?(:to_ary)
|
options[:resource_name] = controller_name if resource.respond_to?(:to_ary)
|
||||||
|
|
||||||
serializer.new(resource, options)
|
serializer.new(resource, options)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user