Skip to content

Commit

Permalink
Fix method redefined warning message in mapper.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeltrix committed Dec 29, 2013
1 parent 15e2eb4 commit 54ccc58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
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'

Expand Down Expand Up @@ -546,11 +547,11 @@ def define_generate_prefix(app, name)
_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) }
Expand Down

0 comments on commit 54ccc58

Please sign in to comment.