Alex Choi
2008-Jun-02 20:56 UTC
stylesheet_link_tag, javascript_include_tag, caching problems
So, the new caching for stylesheet_link_tag, javascript_include_tag which rolls up the files into one all.js or all.css files is great ... however I''ve run into an issue: If all.cs or all.js don''t exist, they get generated ... great, I''ve reduced the number of gets ... The problem is what occurs when the files already exist ... even if I''ve changed my list of js/css files to something completely different, it won''t rewrite the file if it already exists ... Do we really need the unless in this block? (asset_tag_helper.rb) def write_asset_file_contents(joined_asset_path, asset_paths) unless file_exist?(joined_asset_path) FileUtils.mkdir_p(File.dirname(joined_asset_path)) File.open(joined_asset_path, "w+") { |cache| cache.write(join_asset_file_contents(asset_paths)) } end end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Possibly Parallel Threads
- Sprocket Digest + Debug combination broken?
- Help overriding rescue_action_in_public in Rails 3
- help stylesheet_link_tag
- Weird stylesheet_link_tag issue after moving servers
- Rearchitect the new :cache feature of javascript_include_tag, similar to ToolbawksPacker