How to change the default layout directory?

My application has all the controllers for the public part of the site covered by the module Utilisation, and they all inherit from Utilisation::UtilisationController. I want to create a default layout for using / layouts of these controllers / *. Html.erb.

I tried through:

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

but i get

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

How can I change the default layout directory?

+3
source share
1 answer

The path refers to the layout folder. Try:

layout '../utilisation/layouts/application' # without .html.erb is fine
+11
source

Source: https://habr.com/ru/post/1789710/


All Articles