how to use different layout for different pages in ruby on rails? -


i know application.html.erb default every page .i want use different layout when user login .i mean dashboard after login should of different layout rather default one(application.html.erb).

create new layout eg app/views/layouts/dunno.html.erb. use in controller

class dashboardcontroller < applicationcontroller   layout 'dunno' end 

or per action

class dashboardcontroller < applicationcontroller   def index     render layout: 'dunno'   end end 

see docs details


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -