diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-07-24 17:43:33 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:08 +0200 |
commit | 4cd6f7752658f0ec13d082fa2ee2a6f766410645 (patch) | |
tree | d569585d462e556b6549429c13e31949cdb30bb6 /actionpack/lib/action_dispatch/routing | |
parent | a132229d7b4382d9ffe8847fa58f469cb8f2ecfc (diff) | |
download | rails-4cd6f7752658f0ec13d082fa2ee2a6f766410645.tar.gz rails-4cd6f7752658f0ec13d082fa2ee2a6f766410645.tar.bz2 rails-4cd6f7752658f0ec13d082fa2ee2a6f766410645.zip |
We don't need delegating polymorphic_url and polymorphic_path anymore
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 0f8bb5c504..121e7c2c75 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -264,16 +264,6 @@ module ActionDispatch class RoutesProxy include ActionDispatch::Routing::UrlFor - %w(url_options polymorphic_url polymorphic_path).each do |method| - self.class_eval <<-RUBY, __FILE__, __LINE__ +1 - def #{method}(*args) - scope.send(:_with_routes, routes) do - scope.#{method}(*args) - end - end - RUBY - end - attr_accessor :scope, :routes alias :_routes :routes @@ -281,6 +271,12 @@ module ActionDispatch @routes, @scope = routes, scope end + def url_options + scope.send(:_with_routes, routes) do + scope.url_options + end + end + def method_missing(method, *args) if routes.url_helpers.respond_to?(method) self.class.class_eval <<-RUBY, __FILE__, __LINE__ + 1 |