From 214d236e7d9967a887fecee6e24d4c96c4a344dc Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Wed, 11 Oct 2006 04:31:57 +0000 Subject: [PATCH] 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 --- actionpack/CHANGELOG | 3 +++ actionpack/lib/action_controller/routing.rb | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 00b4d93e98c5b..5f28208836062 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Install named routes into ActionView::Base instead of proxying them to the view via helper_method. Closes #5932. [Nicholas Seckar] + * Update to latest Prototype and script.aculo.us trunk versions [Thomas Fuchs] * Fix relative URL root matching problems. [Mark Imbriaco] @@ -8,6 +10,7 @@ * render_text may optionally append to the response body. render_javascript appends by default. This allows you to chain multiple render :update calls by setting @performed_render = false between them (awaiting a better public API). [Jeremy Kemper] +>>>>>>> .r5282 * Rename test assertion to prevent shadowing. Closes #6306. [psross] * Fixed that NumberHelper#number_to_delimiter should respect precision of higher than two digits #6231 [phallstrom] diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index 9fe886d95896f..687f8dc2bc93f 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -1025,11 +1025,8 @@ def length 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