Thursday, 15 April 2010

ruby on rails - How render body content without sidebar and header in rails4 app? -



ruby on rails - How render body content without sidebar and header in rails4 app? -

i'm developing rails application, have sidebar treeview, main content crud forms , header of page.

but when click new, or create, or show, rails reload page.

what can render yield without sidebar , header of page? ( e.g. treeview collapse when go 1 page other page ).

layout

you'll best reading on layouts within rails -

every time application loads view, wrap layout - way define how application looks

i recommend looking @ app/views/layouts/application.html.erb - default / standard layout application, , sidebar & other layout elements reside

--

options

the selection have either utilize conditions determine aspects of layout, or utilize other layouts determine different look

to set other layouts, can this:

#app/controllers/your_controller.rb class yourcontroller < applicationcontroller def action layout "form" #-> utilize app/views/layouts/form.html.erb end end

ruby-on-rails layout rendering partial-views

No comments:

Post a Comment