When is a cached style sheet updated in Rails?

In a Rails application, if I group several style sheets into one using caching, will the updated file automatically update when one of the style sheets is updated?

stylesheet_link_tag "style1.css", "style2.css", :cache => "mystyles"

And, if not, how can I finish the resulting file?

+3
source share
1 answer

In production environments, simply remove all.css from the stylesheets directory as part of your deployment to restore it using the new files.

In development mode, ActionController::Base.perform_cachingthe default is false, so caching will not happen.

+4
source

Source: https://habr.com/ru/post/1722931/


All Articles