On 21 March 2010 20:52, Graham Farrell <li...@ruby-forum.com> wrote: > Luke Pearce wrote: >> Hiya Graham, >> >> It depends on your setup really but I would say in this case you would >> want another controller. >> >> If you've put all the shared html into partials then on the new index >> page you would just need to do a few <%= render :partial => >> 'PARTIAL_NAME'%> to pull in the html you need. >> >> http://api.rubyonrails.org/classes/ActionView/Partials.html >> >> http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials >> >> Cheers >> Luke > > > Thanks for the advice Luke I'll use a new controller for the index page > as some of the other pages don't have partials. > Can I ask how I can link the contollers should I include attributes from > the other controllers index defs etc, such as > > myindexcontroller > > def index > > �...@businesss = Business.all #from the business controller
Business.all is not from the business controller, it is the Business model. You can call this from any controller. Colin -- 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-t...@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.