diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-10-11 04:31:57 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-10-11 04:31:57 +0000 |
commit | 214d236e7d9967a887fecee6e24d4c96c4a344dc (patch) | |
tree | f2765cb925298572a81cbd1eb5b24adcbf57c36d /actionpack/lib/action_controller/routing.rb | |
parent | 111738737674121343fb1aba2f7883e682d205c1 (diff) | |
download | rails-214d236e7d9967a887fecee6e24d4c96c4a344dc.tar.gz rails-214d236e7d9967a887fecee6e24d4c96c4a344dc.tar.bz2 rails-214d236e7d9967a887fecee6e24d4c96c4a344dc.zip |
Install named routes into ActionView::Base instead of proxying them to the view via helper_method. Closes #5932.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5283 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index 9fe886d958..687f8dc2bc 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -1025,11 +1025,8 @@ module ActionController routes.length end - def install(dest = ActionController::Base) - dest.send :include, @module - if dest.respond_to? :helper_method - helpers.each { |name| dest.send :helper_method, name } - end + def install(destinations = [ActionController::Base, ActionView::Base]) + Array(destinations).each { |dest| dest.send :include, @module } end private |