mirror of
https://github.com/github/rails.git
synced 2026-01-25 14:28:28 -05:00
Fixed changing templates in development mode [Stephan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user