diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index 3c16bde09c..a1b8b7cd6e 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -184,6 +184,7 @@ module ActionController # # :call-seq: # to_s() + # # Returns the content of the parameters as a string. ## diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 73df6b693c..d9f7180f51 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -147,22 +147,23 @@ module ActionDispatch # Used by 'direct', 'resolve', and 'polymorphic' route helpers. def add_url_helper(name, defaults, &block) helper = CustomUrlHelper.new(name, defaults, &block) - _path_helper = :"#{name}_path" - _url_helper = :"#{name}_url" + path_name = :"#{name}_path" + url_name = :"#{name}_url" @path_helpers_module.module_eval do - define_method(:"#{_path_helper}") do |*args| + define_method(path_name) do |*args| helper.call(self, args, true) end end - @path_helpers << _path_helper @url_helpers_module.module_eval do - define_method(:"#{_url_helper}") do |*args| + define_method(url_name) do |*args| helper.call(self, args, false) end end - @url_helpers << _url_helper + + @path_helpers << path_name + @url_helpers << url_name self end |