Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelcgo/ec7f40b679aefb2e6211 to your computer and use it in GitHub Desktop.
Save rafaelcgo/ec7f40b679aefb2e6211 to your computer and use it in GitHub Desktop.
Criando Manifest específico para cada Layout
<!-- layouts/_pdf.html.erb -->
<%= stylesheet_link_tag "pdf_manifest", media: "all" %>
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 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
*/
# 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