Answer the question
In order to leave comments, you need to log in
Why does Rails precompile essays?
Do I understand correctly that the precompilation of assets by a Rails application is needed in order to "translate" scss code and coffee code into css and js code, respectively?
That is, if I refuse to use coffee scripts and scss markup, then no precompilation will occur?
And one more thing: if there are scripts in both coffee and js formats, will Rails only precompile coffee?
PS How much does precompilation increase page load time? How beneficial is it to use? Is it worth sacrificing page load time for development convenience?
Answer the question
In order to leave comments, you need to log in
In a development environment, assets are recompiled on-the-fly when the page changes and refreshes.
In a production environment, all your Coffee and SCSS will be minified, compiled, and merged into two static JS and CSS files neatly folded into the public/asssets/ folder
In addition, during the compilation process, a digest will be added to the file name - a hash that guarantees that the user will update the cached assets. Therefore, we must not forget to use image-url and other helpers in Saas files
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question