Closed timscott closed 10 years ago
By the way, I tried just adding /app/views/dossier/layouts/application.html.haml
without success.
Hey @timscott,
There are a couple ways you could handle this. Personally, if you just want a custom stylesheet, I would add a yield :stylesheets
call in your existing layout. You can then have a custom report view that has content_for :stylesheets, stylesheet_link_tag('report')
(content_for
can alternatively take a block).
The second option would be setting the dossier report controller layout in a to_prepare
block in application.rb. For example in application.rb config.to_prepare { Dossier::ReportsController.layout 'report' }
Let me know if you have any questions on either of these options and thanks for using dossier!
This example from the devise wiki explains the same thing with their rails engine, just with a few more examples. https://github.com/plataformatec/devise/wiki/How-To:-Create-custom-layouts#define-in-config
Perfect. Thanks.
Is there a way to use a custom layout for views? My intent is to link a custom stylesheet. Maybe there is another way to do that and otherwise add things to the document head?