aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-12-29 11:47:21 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-12-29 14:38:01 -0800
commit72c290ca1597f2ecf3252aaa51d3baef0cac0440 (patch)
tree2a9340be0b5e6e9b29bb740b0f9a6e63562f620a /actionpack
parent5ac0273cba1d161874de217e2cbef98a81601bf8 (diff)
downloadrails-72c290ca1597f2ecf3252aaa51d3baef0cac0440.tar.gz
rails-72c290ca1597f2ecf3252aaa51d3baef0cac0440.tar.bz2
rails-72c290ca1597f2ecf3252aaa51d3baef0cac0440.zip
avoid extra method calls by just defining the delegate
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 3ffa4b4bea..fb49bc153c 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -315,9 +315,10 @@ module ActionDispatch
include UrlFor
@_routes = routes
- class << self
- delegate :url_for, :to => '@_routes'
+ def self.url_for(options)
+ @_routes.url_for options
end
+
extend routes.named_routes.module
# ROUTES TODO: install_helpers isn't great... can we make a module with the stuff that