Layouts

How to make other controllers use different layouts than the default
ones.

Thank you.

On May 12, 6:22 am, raj [email protected] wrote:

How to make other controllers use different layouts than the default
ones.

Thank you.


Posted viahttp://www.ruby-forum.com/.

Override it?

On May 12, 2:26 pm, rinda [email protected] wrote:

Override it?
http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html#M000129

http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html

‘layout layoutname’

, and if you need a finer-grained control :

in the controller :


layout proc {|controller|
case controller.action_name
when *%w(index list search) then ‘many’
else ‘one’
end
}

Alain R.

blog.ravet.com/

That is quite easy to find in the documentation. Example: in the
controller,
add this:

‘layout layoutname’

On 5/12/07, rinda [email protected] wrote:


http://www.web-buddha.co.uk

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