aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-22 15:51:34 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-22 15:51:34 +0000
commitc19ca5148f55984688d6af54fc4de4b21d528dfd (patch)
treedf6a03b46f47624751472642853d7d811f6ed895
parent3835f6ab25053a64d9bac63bda5d3b62a242f91a (diff)
downloadrails-c19ca5148f55984688d6af54fc4de4b21d528dfd.tar.gz
rails-c19ca5148f55984688d6af54fc4de4b21d528dfd.tar.bz2
rails-c19ca5148f55984688d6af54fc4de4b21d528dfd.zip
Fixed changing templates in development mode [Stephan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-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