Hi
How do I create 1 layout file for the while site and have all
controllers use that? I’d rather avoid copy/pasting for every controller
I have.
Thanks.
Hi
How do I create 1 layout file for the while site and have all
controllers use that? I’d rather avoid copy/pasting for every controller
I have.
Thanks.
Create an application.rhtml in app/views/layouts
Jean N. wrote:
Hi
How do I create 1 layout file for the while site and have all
controllers use that? I’d rather avoid copy/pasting for every controller
I have.Thanks.
The application.rhtml file in the layout directory is the default layout
file that is used for the website. So by modifying that file the
complete site will use that layout without having to include a :layout
symbol with renders etc.
If you want additional layouts add files to that directory and point to
the additional layouts when you render etc:
render ‘whateversuperpage’ :layout => ‘anotherlayout’
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs