After unsuccessfully trying an after_filter to do the render, I did
found out that it is rendering with render_with_no_layout... I was
trying to avoid having an explicit render on every action, and now with
your comment as I re-read the docs, I think I found an oh-so-ugly
solution:
layout proc{ |controller| [ 'new', 'etc'
].include?(controller.action_name) ? 'application' : 'otherlayout' }
Thanks
James Englert wrote:
> I would try to explicitly specify the layout for the other actions. If
> you
> read the docs, you can sort of infer that no layout will be applied if
> you
> explicitly apply a layout to some actions:
> http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html
>
> "This will assign "weblog_standard" as the WeblogController's
> layout<http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html#M000301>except
> for the
> rss action, which will not wrap a
> layout<http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html#M000301>around
> the rendered view."
>
> Not sure that's the right answer -- just offering.
>
> jim
> jim-rants.com
>
> On Wed, Nov 19, 2008 at 10:44 PM, Ivan V.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---