Is it possible to use partials with the layout option inside of a controller?

Posted by Janak on Stack Overflow See other posts from Stack Overflow or by Janak
Published on 2010-05-06T05:51:56Z Indexed on 2010/05/06 5:58 UTC
Read the original article Hit count: 278

Filed under:
|

When try I following code in a controller, the view renders without using the layout

  def xyz
    render :partial => 'platinum_home', :layout => 'platinum_layout'
  end

But If I do the following inside the partial

<% render(:layout => "platinum_layout") do %>
  blah blah blah
<% end %>

It works just fine, is the first example not possible using rails?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby