Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the default layout directory?

My application has all the controllers for the public part of the site scoped under the Utilisation module and they all inherit from the Utilisation::UtilisationController. I want to make the default layout for these controllers 'utilisation/layouts/*.html.erb'.

I tried via:

layout 'utilisation/layouts/application.html.erb'

but i get

ActionView::MissingTemplate (Missing layout layouts/utilisation/application ...

How can I change the default layout directory ?

like image 711
clyfe Avatar asked Dec 21 '22 18:12

clyfe


1 Answers

The path is relative to layouts folder. Try:

layout '../utilisation/layouts/application' # without .html.erb is fine
like image 191
andrea Avatar answered Jan 10 '23 18:01

andrea