Skip to content

Commit

Permalink
Fixed changing templates in development mode [Stephan Kaes]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Jul 22, 2005
1 parent 3835f6a commit c19ca51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions actionpack/lib/action_view/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c19ca51

Please sign in to comment.