From fc4582fb6684ce72f5628629ea7d061659b790f8 Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Thu, 25 Feb 2010 16:48:36 -0800 Subject: Final pass at removing the router from a global constant --- actionpack/lib/action_controller/railties/url_helpers.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 actionpack/lib/action_controller/railties/url_helpers.rb (limited to 'actionpack/lib/action_controller/railties/url_helpers.rb') diff --git a/actionpack/lib/action_controller/railties/url_helpers.rb b/actionpack/lib/action_controller/railties/url_helpers.rb new file mode 100644 index 0000000000..354d3fa898 --- /dev/null +++ b/actionpack/lib/action_controller/railties/url_helpers.rb @@ -0,0 +1,14 @@ +module ActionController + class Railtie + module UrlHelpers + def self.with(router) + Module.new do + define_method(:inherited) do |klass| + super + klass.send(:include, router.named_url_helpers) + end + end + end + end + end +end \ No newline at end of file -- cgit v1.2.3