diff options
author | Jamis Buck <jamis@37signals.com> | 2006-03-30 15:15:26 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-03-30 15:15:26 +0000 |
commit | ef4b8c237a3e2d0bc59f06c5696004dca27efe0a (patch) | |
tree | 1cfc8b1b8c4174748ee7d158b43879483e7e6c62 /actionpack/lib | |
parent | 0703149e713c112f8568d396e7bc6e9be21c31d2 (diff) | |
download | rails-ef4b8c237a3e2d0bc59f06c5696004dca27efe0a.tar.gz rails-ef4b8c237a3e2d0bc59f06c5696004dca27efe0a.tar.bz2 rails-ef4b8c237a3e2d0bc59f06c5696004dca27efe0a.zip |
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
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 21708a37ef..2d9d7556eb 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -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 |