hey! i have a little question, how can i put different layouts for the actions in a controller? for example in my login controller, i have an action, that i dont want to have the same layout as the others. i tried something so: layout ''admin'', :except => [:show_users] it works, but show_users, doesnt have any layout. where shall i put the layout for show_users? (it doesnt work, if i put a layout in the action) thanks!! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
def thisismyaction render :layout=>''mycustomlayout'' end Is that what you are looking for? demonio de los andes escribió:> > hey! > > i have a little question, how can i put different layouts for the > actions in a controller? for example in my login controller, i have an > action, that i dont want to have the same layout as the others. > > i tried something so: > > layout ''admin'', :except => [:show_users] > > it works, but show_users, doesnt have any layout. where shall i put the > layout for show_users? (it doesnt work, if i put a layout in the action) > > thanks!! >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
hi matias! that doesnt solve my problem, i become more errors. there is nothing more simple, like i dont know: layout ''admin'', :except => [:show_users, :layout => "admin"] or something like so? ty!! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---