Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Extend the view instance directly instead of mucking with anonymous s…

…ubclasses.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6821 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 301b92370a3e27f9ffd40c64824bc7e8313541fb 1 parent 27ff573
@jeremy jeremy authored
Showing with 2 additions and 10 deletions.
  1. +2 −10 actionpack/lib/action_controller/base.rb
View
12 actionpack/lib/action_controller/base.rb
@@ -1075,19 +1075,11 @@ def reset_session #:doc:
end
private
- def self.view_class
- unless defined? @view_class
- # Create a template subclass including helper methods.
- @view_class = Class.new(ActionView::Base)
- @view_class.send(:include, master_helper_module)
- end
- @view_class
- end
-
def initialize_template_class(response)
raise "You must assign a template class through ActionController.template_class= before processing a request" unless @@template_class
- response.template = self.class.view_class.new(view_paths, {}, self)
+ response.template = ActionView::Base.new(view_paths, {}, self)
+ response.template.extend self.class.master_helper_module
response.redirected_to = nil
@performed_render = @performed_redirect = false
end
Please sign in to comment.
Something went wrong with that request. Please try again.