[Rails] *Very* basic layout question
Michiel Sikkes
michiel.sikkes at gmail.com
Sun Jan 22 16:50:35 GMT 2006
2006/1/22, Jakob L. Skjerning <jakob at mentalized.net>:
> Santiago Hirschfeld wrote:
> > Thanks, I did
> >
> > def some_action
> > .....
> > render(:action => 'some_action', :layout => 'simple')
> > end
> >
> > And it worked fine, but i wonder if there is right to render an action
> > from the same action =) sorry for another stupid question, but I'm
> > curious.
>
> Yeah, it's fine this way. Basically, Rails will do just that for you if
> you don't yourself. Doing it yourself just gives you a bit more control
> - and code.
>
To make the code look nicer, you can also just use render :layout =>
'simple'. Which renders the current action with the 'simple' layout.
--
Michiel Sikkes
michiel.sikkes at gmail.com
More information about the Rails
mailing list