diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index b437d7a17d..900900ee24 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -274,6 +274,12 @@ module ActionDispatch end alias_method :default_url_options, :default_url_options= + def with_default_scope(scope, &block) + scope(scope) do + instance_exec(&block) + end + end + private def app_name(app) return unless app.respond_to?(:routes) |