diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-12-29 17:55:54 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-12-29 17:55:54 +0000 |
commit | 54ccc58c6208601a5714cff1b05418979656bf22 (patch) | |
tree | 1d847a14d5434e1bb15f2a37e00ab7cdd46925e7 /actionpack | |
parent | 15e2eb42a7b1c251defd088ac65a89f152a307f6 (diff) | |
download | rails-54ccc58c6208601a5714cff1b05418979656bf22.tar.gz rails-54ccc58c6208601a5714cff1b05418979656bf22.tar.bz2 rails-54ccc58c6208601a5714cff1b05418979656bf22.zip |
Fix method redefined warning message in mapper.rb
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index bfba8d143d..4bf2dc6e23 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -3,6 +3,7 @@ require 'active_support/core_ext/hash/reverse_merge' require 'active_support/core_ext/hash/slice' require 'active_support/core_ext/enumerable' require 'active_support/core_ext/array/extract_options' +require 'active_support/core_ext/module/remove_method' require 'active_support/inflector' require 'action_dispatch/routing/redirection' @@ -546,11 +547,11 @@ module ActionDispatch _routes = @set app.routes.define_mounted_helper(name) app.routes.singleton_class.class_eval do - define_method :mounted? do + redefine_method :mounted? do true end - define_method :_generate_prefix do |options| + redefine_method :_generate_prefix do |options| prefix_options = options.slice(*_route.segment_keys) # we must actually delete prefix segment keys to avoid passing them to next url_for _route.segment_keys.each { |k| options.delete(k) } |