Mischa Molhoek
2005-Apr-12 13:34 UTC
one def NOT using views/layout/application.rhtml , but the other def''s do
Hi all, How do i make one def in a controller NOT use app/views/layout/application.rhtml while the other def''s DO use it. I removed the app/views/layout/<controller>.rhtml, so the controller will use app/views/layout/application.rhtml tanx in advance, Mischa
Rick Olson
2005-Apr-12 13:43 UTC
Re: one def NOT using views/layout/application.rhtml , but the other def''s do
There are different ways to do it, depending on what you want to do exactly.
You can specify something like:
layout "weblog_standard", :except => :rss
Or maybe something different in a single method:
def help
render_with_layout "help/index", "200",
"layouts/help"
end
Consult the docs for more detail:
http://rails.rubyonrails.com/classes/ActionController/Layout/ClassMethods.html
On 4/12/05, Mischa Molhoek
<mischa-kVJDZvz1jv8qcZcGjlUOXw@public.gmane.org>
wrote:> Hi all,
>
> How do i make one def in a controller NOT use
app/views/layout/application.rhtml
> while the other def''s DO use it.
>
> I removed the app/views/layout/<controller>.rhtml, so the controller
will use app/views/layout/application.rhtml
>
> tanx in advance,
>
> Mischa
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
rick
http://techno-weenie.net
Wolfgang Klinger
2005-Apr-12 13:43 UTC
Re: one def NOT using views/layout/application.rhtml , but the other def''s do
Hi! On Tue, 12 Apr 2005, Mischa Molhoek wrote the following:> How do i make one def in a controller NOT use app/views/layout/application.rhtml > while the other def''s DO use it. >in your controller: ---- layout ''application'', :except => :not_with_this_one ---- bye Wolfgang
Mischa Molhoek
2005-Apr-12 14:33 UTC
Re: one def NOT using views/layout/application.rhtml , but the other def''s do
Wolfgang Klinger wrote:> Hi! > > On Tue, 12 Apr 2005, Mischa Molhoek wrote the following: > >>How do i make one def in a controller NOT use app/views/layout/application.rhtml >>while the other def''s DO use it. >> > > in your controller: > ---- > layout ''application'', :except => :not_with_this_one > ---- > > bye > WolfgangOK tanx, that works fine :) mischa