Last active
August 29, 2015 14:02
-
-
Save rafaelcgo/ec7f40b679aefb2e6211 to your computer and use it in GitHub Desktop.
Criando Manifest específico para cada Layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- layouts/_pdf.html.erb --> | |
<%= stylesheet_link_tag "pdf_manifest", media: "all" %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Crie a pasta stylesheets/pdf | |
Coloque os .css.scss que deseja lá dentro | |
Crie um stylesheets/pdf_manifest.css.sccs | |
Inclua os .css que precisar no manifest (*= require) | |
Adicione a regra de compilação no production.rb | |
Carregue o manifest que deseja no layout específico. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a manifest file that'll automatically include all the stylesheets available in this directory | |
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at | |
* the top of the compiled file, but it's generally better to create a new file per style scope. | |
*= require_self | |
*= require_tree ./pdf | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) | |
config.assets.precompile += %w( pdf_manifest.css ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment