aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-03-07 00:48:28 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-03-07 00:48:28 +0000
commit182b3ed70c81ae9450ee8ba7d8939510a19853fe (patch)
tree63809e19f53fc202369acae0bd027ba2352b9d2a /actionpack/lib
parentd4528effbbd28103f314b2ec373c403d6def14d4 (diff)
downloadrails-182b3ed70c81ae9450ee8ba7d8939510a19853fe.tar.gz
rails-182b3ed70c81ae9450ee8ba7d8939510a19853fe.tar.bz2
rails-182b3ed70c81ae9450ee8ba7d8939510a19853fe.zip
Backed out of using File.atomic_write in the asset_tag_helper.rb as its still half-baked. Most importantly, it creates files with different permissions than File.open/write
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index 6905aaf06e..8b9e4094ce 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -147,7 +147,7 @@ module ActionView
joined_javascript_path = File.join(JAVASCRIPTS_DIR, joined_javascript_name)
if !File.exists?(joined_javascript_path)
- File.atomic_write(joined_javascript_path, File.dirname(joined_javascript_path)) do |cache|
+ File.open(joined_javascript_path, "w+") do |cache|
javascript_paths = expand_javascript_sources(sources).collect do |source|
compute_public_path(source, 'javascripts', 'js', false)
end
@@ -242,9 +242,9 @@ module ActionView
joined_stylesheet_path = File.join(STYLESHEETS_DIR, joined_stylesheet_name)
if !File.exists?(joined_stylesheet_path)
- File.atomic_write(joined_stylesheet_path, File.dirname(joined_stylesheet_path)) do |cache|
+ File.open(joined_stylesheet_path, "w+") do |cache|
stylesheet_paths = expand_stylesheet_sources(sources).collect do |source|
- compute_public_path(source, 'stylesheets', 'css', false)
+ compute_public_path(source, 'stylesheets', 'css', false)
end
cache.write(join_asset_file_contents(stylesheet_paths))