Make render json work when not using AMS

This commit is contained in:
Santiago Pastorino
2013-09-14 20:31:36 -03:00
parent 7405baafd7
commit 8462a73f3a
2 changed files with 18 additions and 0 deletions

View File

@@ -68,6 +68,8 @@ module ActionController
options.delete(:serializer) ||
ActiveModel::Serializer.serializer_for(resource)
return unless serializer
options[:scope] = serialization_scope unless options.has_key?(:scope)
serializer.new(resource, options)