ruby on rails - Invisible CSS comments -


I recently used the ruby ​​observations%> on the & lt;% # Rails in our html.erb files These sources are not displayed in the code that can be viewed by a user.

Is there any way to add comments to CSS files that keep them private with the eyes of satanic viewers?

There is a good gem:

And it works like a magic: This is to mention in the Gem file (Rail 3)

  Gem "smurf"  

And that's it! Okay, if you use: cache => ... in your stylesheet_link_tag:

  stylesheet_link_tag "foo", "bar" ,: cache = & gt; "Public.css"  

This prevents standard rail behavior that saves the saved files on disk and compresses them already.

To make it more clear - it will be concise only to file in production mode: The cache option works only if caching is enabled


Comments