Permalink
Browse files

Fixed changing templates in development mode [Stephan Kaes]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 3835f6a commit c19ca5148f55984688d6af54fc4de4b21d528dfd @dhh dhh committed Jul 22, 2005
Showing with 3 additions and 2 deletions.
  1. +3 −2 actionpack/lib/action_view/base.rb
@@ -266,8 +266,9 @@ def template_exists?(template_path, extension)
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

0 comments on commit c19ca51

Please sign in to comment.