Drop reference to self

This commit is contained in:
Adrian Mugnolo 2013-12-19 11:54:19 -02:00
parent 80ff5ebc5a
commit 1c9ab8fd24

View File

@ -66,7 +66,7 @@ module ActionController
if serializer = options.fetch(:serializer, ActiveModel::Serializer.serializer_for(resource))
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)
end