aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rwxr-xr-xactionpack/lib/action_controller/base.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index cfd60ac6bf..b2ad440997 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -1076,11 +1076,12 @@ module ActionController #:nodoc:
private
def self.view_class
- @view_class ||=
- # create a new class based on the default template class and include helper methods
- returning Class.new(ActionView::Base) do |view_class|
- view_class.send(:include, master_helper_module)
- end
+ 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)