From 6a9d1925dc3fc1d54470cb548a595698429a1047 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 10 Aug 2015 11:39:41 -0700 Subject: we have the resource on the stack, so just use it We don't need to ask `scope` for the resource because we already have it right here. --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index ab13fb14ce..c93a64fcf4 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1692,7 +1692,7 @@ module ActionDispatch @nesting.push(resource) with_scope_level(kind) do - controller_scope(parent_resource.resource_scope) { yield } + controller_scope(resource.resource_scope) { yield } end ensure @nesting.pop -- cgit v1.2.3