diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-10-26 14:27:18 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2010-10-26 14:27:18 +0100 |
commit | 4ba24ba043a00e61e97369e6664d5c0fcdbc0fe8 (patch) | |
tree | 1ed823580f576b96d747febd507442d053c55f40 /actionpack/lib | |
parent | c40074c1c7253f89ca9daf69b1a61068a478f144 (diff) | |
download | rails-4ba24ba043a00e61e97369e6664d5c0fcdbc0fe8.tar.gz rails-4ba24ba043a00e61e97369e6664d5c0fcdbc0fe8.tar.bz2 rails-4ba24ba043a00e61e97369e6664d5c0fcdbc0fe8.zip |
Allow generated url helpers to be overriden [#5243 state:resolved]
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 1c63fb2d14..475785a4b4 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -46,14 +46,14 @@ module AbstractController @view_context_class ||= begin controller = self Class.new(ActionView::Base) do + if controller.respond_to?(:_routes) && controller._routes + include controller._routes.url_helpers + include controller._routes.mounted_helpers + end + if controller.respond_to?(:_helpers) include controller._helpers - if controller.respond_to?(:_routes) && controller._routes - include controller._routes.url_helpers - include controller._routes.mounted_helpers - end - # TODO: Fix RJS to not require this self.helpers = controller._helpers end |