Re: render_component includes layout

Matthew D. <matt@…> writes:

or by calling render(:layout=>false,…) in the action that creates the
component."

I’ve tried both of these and yet I still end up with the layout being
included in the output. The one thing that may be important is that the
controller I’m rendering is nested, i.e. I have:

I have this same problem…

calling render_component :controller=>x, :action=>y with :layout =>
false or
:layout => nil still renders the layout for that controller.

Is there any way to make it not render the layout ?

  • steve dp

On Nov 17, 2005, at 10:59 PM, steve dp wrote:

actions used to render components from layout processing, either
that the

  • steve dp

Guys-

Here is how I get around this issue:

def x
    if params[:no_layout]
  do stuff....
  render :layout => false
   else
      do stuff ....
      render :layout => "x_tmpl"
   end
end

And then you can call the render_component like this:

render_component( :controller=>x, :action=>y, :params =>
{:no_layout => true})

HTH-

-Ezra Z.
Yakima Herald-Republic
WebMaster

509-577-7732
[email protected]