remove scope as a separate concept and pass it in

as an option.
This commit is contained in:
Yehuda Katz
2012-01-11 21:16:02 -07:00
parent 4ad9c64e46
commit 671fc14888
7 changed files with 62 additions and 54 deletions

View File

@@ -42,7 +42,8 @@ module ActionController
end
if json.respond_to?(:active_model_serializer) && (serializer = json.active_model_serializer)
json = serializer.new(json, serialization_scope, options)
options[:scope] = serialization_scope
json = serializer.new(json, options)
end
super
end