From ed3e48973368f2eabf8ab69f9ee0bf34cb3ef51c Mon Sep 17 00:00:00 2001 From: Samuel Kadolph Date: Thu, 29 Jul 2010 15:36:43 -0400 Subject: [PATCH] fixed overriding of route generated helpers [#5243 state:resolved] --- actionpack/lib/abstract_controller/rendering.rb | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index b81d595..edab43b 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -47,13 +47,13 @@ module AbstractController @view_context_class ||= begin controller = self Class.new(ActionView::Base) do + if controller.respond_to?(:_routes) + include controller._routes.url_helpers + end + if controller.respond_to?(:_helpers) include controller._helpers - if controller.respond_to?(:_routes) - include controller._routes.url_helpers - end - # TODO: Fix RJS to not require this self.helpers = controller._helpers end -- 1.7.0.4