I'm using Rails 3.1. My JavaScript and CSS files are included in usual way:
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
Now I want to create standalone version of existing page with default layout. I want it to be a single html file that user can download and use in offline. So, JavaScript and CSS code must be included in content of this file. How can I do this?
You can create a separate CSS and JS and include them in config.assets.precompile key in the file config/application.rb.
Check this link
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.