diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-23 08:00:35 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-23 08:00:35 +0000 |
commit | 301b92370a3e27f9ffd40c64824bc7e8313541fb (patch) | |
tree | 6b002896348d147b36f87f63fb91fedeff4a8f6d /actionpack/lib | |
parent | 27ff573290e6927c15e9d6d3fa6a4432b31ae1aa (diff) | |
download | rails-301b92370a3e27f9ffd40c64824bc7e8313541fb.tar.gz rails-301b92370a3e27f9ffd40c64824bc7e8313541fb.tar.bz2 rails-301b92370a3e27f9ffd40c64824bc7e8313541fb.zip |
Extend the view instance directly instead of mucking with anonymous subclasses.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6821 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index b2ad440997..dc5a1d18cd 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1075,19 +1075,11 @@ module ActionController #:nodoc: 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 |