mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make asset timestamping safe to use on assets that don't exist
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4103 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
0703149e71
commit
ef4b8c237a
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ module ActionView
|
|||
|
||||
def rails_asset_id(source)
|
||||
ENV["RAILS_ASSET_ID"] ||
|
||||
File.stat(RAILS_ROOT + "/public/#{source}").mtime.to_i.to_s
|
||||
File.mtime("#{RAILS_ROOT}/public/#{source}").to_i.to_s rescue ""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue