mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Make render json work when not using AMS
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user