How to use same lay out for two controllers?

Hi,

I have two controllers called user and languages. languages is generated
by scaffold. where user is created using rails generators. But user
controller is not using languages layout. how do I make user_controller
to use languages.rhtml as defualt layout.

Thanks in advance,
sharma

You can specify a different layout to use in the controller.

So inside the user_controller add this line
layout ‘languages’

and it should look in the layout folder for a languages.rhtml file.

put this at the top of your user_controller:

layout “languages”

Thank youguys. I need to observe keenly.
jstepper wrote:

put this at the top of your user_controller:

layout “languages”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs