mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Allow passing in the serializer class from the render method
This commit is contained in:
@@ -44,7 +44,10 @@ module ActionController
|
||||
options[:root] ||= controller_name
|
||||
end
|
||||
|
||||
if json.respond_to?(:active_model_serializer) && (serializer = json.active_model_serializer)
|
||||
serializer = options.delete(:serializer) ||
|
||||
(json.respond_to?(:active_model_serializer) && json.active_model_serializer)
|
||||
|
||||
if serializer
|
||||
options[:scope] = serialization_scope
|
||||
|
||||
if default_options = default_serializer_options
|
||||
|
||||
Reference in New Issue
Block a user