From 72c290ca1597f2ecf3252aaa51d3baef0cac0440 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 29 Dec 2011 11:47:21 -0800 Subject: avoid extra method calls by just defining the delegate --- actionpack/lib/action_dispatch/routing/route_set.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack') 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 -- cgit v1.2.3