aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/base.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2009-02-09 14:20:30 -0600
committerJoshua Peek <josh@joshpeek.com>2009-02-09 14:20:30 -0600
commit893e9eb99504705419ad6edac14d00e71cef5f12 (patch)
tree17a2c15b63335beb97ecfea5ca6ca5a776639fa5 /actionpack/lib/action_view/base.rb
parent5120429c3138d46490a1c4a611ebd93410f4f885 (diff)
downloadrails-893e9eb99504705419ad6edac14d00e71cef5f12.tar.gz
rails-893e9eb99504705419ad6edac14d00e71cef5f12.tar.bz2
rails-893e9eb99504705419ad6edac14d00e71cef5f12.zip
Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r--actionpack/lib/action_view/base.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 70a0ba91a7..3134807a08 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -182,6 +182,10 @@ module ActionView #:nodoc:
# that alert()s the caught exception (and then re-raises it).
cattr_accessor :debug_rjs
+ # Specify whether to check whether modified templates are recompiled without a restart
+ @@cache_template_loading = false
+ cattr_accessor :cache_template_loading
+
attr_internal :request
delegate :request_forgery_protection_token, :template, :params, :session, :cookies, :response, :headers,
@@ -243,8 +247,8 @@ module ActionView #:nodoc:
if options[:layout]
_render_with_layout(options, local_assigns, &block)
elsif options[:file]
- tempalte = self.view_paths.find_template(options[:file], template_format)
- tempalte.render_template(self, options[:locals])
+ template = self.view_paths.find_template(options[:file], template_format)
+ template.render_template(self, options[:locals])
elsif options[:partial]
render_partial(options)
elsif options[:inline]