Skip to content
Browse files

remove alias_method_chain

we can `super` in to the previous implementation.
  • Loading branch information...
1 parent 0960327 commit 68aea29cf5e5b856fdfa0b3087bf68cbd6310bd6 @tenderlove tenderlove committed Jul 30, 2014
Showing with 2 additions and 4 deletions.
  1. +2 −4 actionpack/lib/action_dispatch/routing/route_set.rb
View
6 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -165,12 +165,10 @@ def path_helpers_module(warn = false)
include mod
helpers.each do |meth|
- define_method("#{meth}_with_warning") do |*args, &block|
+ define_method(meth) do |*args, &block|
ActiveSupport::Deprecation.warn("The method `#{meth}` cannot be used here as a full URL is required. Use `#{meth.to_s.sub(/_path$/, '_url')}` instead")
- send("#{meth}_without_warning", *args, &block)
+ super(*args, &block)
end
-
- alias_method_chain meth, :warning
end
end
else

0 comments on commit 68aea29

Please sign in to comment.
Something went wrong with that request. Please try again.