diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-04 12:04:29 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-04 12:07:37 +0200 |
commit | 1632a3a49fb318be25d832b7efb17093bd7ef8ae (patch) | |
tree | 7059e65539d67ca38ca7ce8c1c9e3d0482acadd2 /actionpack/lib/abstract_controller | |
parent | 30bb17e5e09571396d1e7896888780e5cee840b6 (diff) | |
download | rails-1632a3a49fb318be25d832b7efb17093bd7ef8ae.tar.gz rails-1632a3a49fb318be25d832b7efb17093bd7ef8ae.tar.bz2 rails-1632a3a49fb318be25d832b7efb17093bd7ef8ae.zip |
More AV::Base cleanup.
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index a5f983a55b..f78365afdb 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -46,20 +46,9 @@ module AbstractController module ClassMethods def view_context_class @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 - - # TODO: Fix RJS to not require this - self.helpers = controller._helpers - end - end + routes = _routes if respond_to?(:_routes) + helpers = _helpers if respond_to?(:_helpers) + ActionView::Base.prepare(routes, helpers) end end end @@ -121,7 +110,6 @@ module AbstractController view_renderer.render(view_context, options) end - private # This method should return a hash with assigns. |