Namespaced application layout?


I have an admin namespace in my app. I would like to have a layout
that would work like app/layouts/application.html.erb, but instead off
affecting the entire app it would only affect all the views inside of

How would this be done?



Create a basic admin controller, like this:

class Admin::BaseController < ApplicationController
layout :admin

Then make all admin controllers inherit from it. And also create an
layouts/admin.html.erb file :wink:

Maurício Linhares (pt-br) | (en)


Thanks Maurício.

That worked nicely.

On Jun 5, 11:02 pm, Maurício Linhares removed_email_address@domain.invalid