Skip to content
Browse files

We seem to have removed the URL helpers from ActionView subclasses...

  • Loading branch information...
1 parent a5d80f8 commit 995f57033f5a36d9ddd3aa65f0f01cccbb6baf6e @wycats wycats committed Mar 18, 2010
View
1 actionpack/lib/abstract_controller/layouts.rb
@@ -297,6 +297,7 @@ def _normalize_options(options)
def initialize(*)
@action_has_layout = true
+ super
end
def action_has_layout?
View
6 actionpack/lib/abstract_controller/rendering.rb
@@ -49,6 +49,7 @@ def view_context_class
Class.new(ActionView::Base) do
if controller.respond_to?(:_helpers)
include controller._helpers
+ include controller._router.url_helpers
# TODO: Fix RJS to not require this
self.helpers = controller._helpers
end
@@ -63,6 +64,11 @@ def view_context_class
@view_context_class || self.class.view_context_class
end
+ def initialize(*)
+ @view_context_class = nil
+ super
+ end
+
# An instance of a view class. The default view class is ActionView::Base
#
# The view class must have the following methods:
View
1 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -258,6 +258,7 @@ class << self
# Yes plz - JP
included do
routes.install_helpers(self)
+ singleton_class.send(:define_method, :_router) { routes }
end
define_method(:_router) { routes }

0 comments on commit 995f570

Please sign in to comment.
Something went wrong with that request. Please try again.