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

How to run C# code using mono without Xamarin in Android? -

python - Specify path of savefig with pylab or matplotlib -

c# - SharpSsh Command Execution -