aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_view/base.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 6ffdd55a7e..3dd038b048 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -266,8 +266,9 @@ module ActionView #:nodoc:
def read_template_file(template_path, extension)
info = @@loaded_templates[template_path]
- read_file = info.nil?
- read_file ||= info.is_a?(Time) && info<File.stat(template_path).mtime unless @@cache_template_loading
+ read_file = info.nil? || ( info.is_a?(Time) ?
+ info < File.stat(template_path).mtime :
+ !@@cache_template_loading )
if read_file
@@loaded_templates[template_path] = info = File.read(template_path)
@@compiled_erb_templates[template_path] = nil if 'rhtml' == extension