Forum: Ruby on Rails render_component ignores :layout => nil

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7caf5e0e794927e8956a220aca6f3ac9?d=identicon&s=25 Henning (Guest)
on 2005-12-07 14:05
Hello,

I try to include an action to my main page like this:

<code><%= render_component(:controller => 'patient', :action => 'list',
:layout => nil) %></code>

But the action is rendered in the default layout. Why is <code>:layout
=> nil</code> ignored?
A43430351a6d4fb6d61d000bd56ed19a?d=identicon&s=25 francois (Guest)
on 2005-12-07 14:44
(Received via mailing list)
try doing
:layout => false
7caf5e0e794927e8956a220aca6f3ac9?d=identicon&s=25 Henning <Henning.Meyer@charite.de> (Guest)
on 2005-12-07 14:52
> try doing
> :layout => false

It does not help.. any other ideas?
821395fe70906c8290df7f18ac4ac6cf?d=identicon&s=25 technoweenie (Guest)
on 2005-12-07 14:56
(Received via mailing list)
> >I try to include an action to my main page like this:
> >
> ><code><%= render_component(:controller => 'patient', :action => 'list',
> >:layout => nil) %></code>
> >
> >But the action is rendered in the default layout. Why is <code>:layout
> >=> nil</code> ignored?

The component is doing its own render call.  You will have to do
something like:

<%= render_component :controller => 'patient', :action => 'list',
:params => { :layout => false } %>

Then params[:layout] should be false.

--
rick
http://techno-weenie.net
This topic is locked and can not be replied to.