[prev in list] [next in list] [prev in thread] [next in thread]
List: rails
Subject: [Rails] Using different layouts inside one controller
From: jarkko () jlaine ! net (Jarkko Laine)
Date: 2005-01-29 19:45:48
Message-ID: 60915bec67f0eafbc6c607b6e3d27461 () jlaine ! net
[Download RAW message or body]
On 29.1.2005, at 02:08, Duane Johnson wrote:
> I'm not sure if it's just my understanding of layouts or what, but I
> was a bit confused by the following:
Sorry, I answered Ben yesterday, but it seems my response cam not to
the list. I wasn't sure at first if Ben meant layout in general (as a
web design term) or RoR Layouts. The latter turned out to be the case.
So here's my response from yesterday, although I think Bruno already
covered this pretty well:
On 28.1.2005, at 18:18, Ben Sinclair wrote:
> Well, what I really meant was I want to override the layout for a
> certain action in my controller.
Yes, you can.
class WeblogController < ActionController::Base
layout "weblog_standard", :except => :rss
# ...
end
This will use the layout for all actions except rss. See the bottom of
the api docs for more options:
http://rails.rubyonrails.com/classes/ActionController/Layout/
ClassMethods.html
--
Jarkko Laine
http://jlaine.net
http://odesign.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2363 bytes
Desc: not available
Url : http://one.textdrive.com/pipermail/rails/attachments/20050129/77a3ba77/smime.bin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic