Nest scope under context option

This commit is contained in:
Adrian Mugnolo and Santiago Pastorino
2014-01-06 15:35:21 -02:00
committed by Santiago Pastorino
parent 8bd2542ed2
commit 0d8ef2b165
9 changed files with 56 additions and 85 deletions

View File

@@ -43,7 +43,7 @@ module ActionController
class DefaultOptionsForSerializerScopeTest < ActionController::TestCase
class MyController < ActionController::Base
def default_serializer_options
{ scope: current_admin }
{ context: { scope: current_admin } }
end
def render_using_scope_set_in_default_serializer_options
@@ -73,7 +73,7 @@ module ActionController
class ExplicitSerializerScopeTest < ActionController::TestCase
class MyController < ActionController::Base
def render_using_implicit_serializer_and_explicit_scope
render json: Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' }), scope: current_admin
render json: Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' }), context: { scope: current_admin }
end
private