Hello all, I'm learning Ruby on Rails and still kind of new at this. I have two different layouts (standard page and dialog box) for a view (show). How do I set each layout in the controller to show the different layout?
Something like this... - Controller - def show @project = Project.find(params[:id]) if 'view is page' render :layout => 'page_layout' else render :layout => 'dialog' end Where would I set the variable? in the show.html.erb? Thank you for any help. JohnM -- 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---