I am using Rails3 I have many layouts in my project, I am defining layout’layout_name’ at the top of my controller. I am facing problem like all the layouts are rendering but only one layout is not rendering .. Can anybody say what is the reason?
Share
Have a look at the tutorial about rendering, especially the section 2.2.13 “Finding Layout”. There are the different options listed:
app/views/layoutsas your controller. So when your controller is namedWorkItemsController, the corresponding layout is namedwork_items.htmlerbwork.html.erb:class WorkItemsController < ApplicationController; layout "work"; ...Have a look at the API for layout to see all options possible here.