sa 125, This paper (Modular Page Assembly in Rails) helps a lot:
http://www.railsdev.ws/blog/3/modular-page-assembly-in-rails/ Cheers, Sazima On Dec 23, 12:38 pm, sa 125 <[email protected]> wrote: > Hello - very new to rails and MVC, I'm trying to figure out how > layouts/partials co-exist. My basic layout (application.html.erb) looks > like this: > > <body> > <div id="wrapper"> > <%= render :partial => "main/header" %> > <div id="content"> > <%= render => :partial => "main/menu" %> > <%= render => :partial => @partial %> > </div> > </div> > </body> > > and my MainController is: > > class MainController > > def index > @partial = "main/home" > end > > end > > Now, I found that I have to create an index.html.erb file that's > identical to the application.html.erb file, or nothing works (neither > can exist without the other). I'm trying to understand what I'm doing > wrong -- obviously I need some index action in my controller, but I'd > like to just maintain one layout file and nothing else.. I'm obviously > missing something big here, so any clarifications will be great :) > -- > Posted viahttp://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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

