diff options
author | Andrew White <andrew.white@unboxed.co> | 2017-02-21 12:57:08 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2017-02-21 15:30:47 +0000 |
commit | fbda6b9837e3ce41dc59de0e791c972ba6d49ba3 (patch) | |
tree | 04ea650951977e54664f4873f8684cb9bca96e0e /actionpack/lib/action_dispatch/routing/route_set.rb | |
parent | ef862c04e5cc4deed04e0ffc70af88431803efe6 (diff) | |
download | rails-fbda6b9837e3ce41dc59de0e791c972ba6d49ba3.tar.gz rails-fbda6b9837e3ce41dc59de0e791c972ba6d49ba3.tar.bz2 rails-fbda6b9837e3ce41dc59de0e791c972ba6d49ba3.zip |
Push option extract into call method
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 832f6f12ab..a2e5351697 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -164,15 +164,13 @@ module ActionDispatch @path_helpers_module.module_eval do define_method(:"#{name}_path") do |*args| - options = args.extract_options! - helper.call(self, args, options, only_path: true) + helper.call(self, args, only_path: true) end end @url_helpers_module.module_eval do define_method(:"#{name}_url") do |*args| - options = args.extract_options! - helper.call(self, args, options) + helper.call(self, args) end end end @@ -621,7 +619,8 @@ module ActionDispatch @block = block end - def call(t, args, options, outer_options = {}) + def call(t, args, outer_options = {}) + options = args.extract_options! url_options = eval_block(t, args, options) case url_options |