My application contains following controllers: 1. Topics 2. Items 3. Attachments 4. Users
Following are the models: 1. Topics has_many items 2. Items has_many attachments 3. Attachments 4. Users has_many topics 5. Cities has_many counties 6. Counties has_many users, topics A topic contains many items. When I try to display a topic, I need to get its corresponding items, their attachments and display everything in a single page. In addition I have some filters on who can add/edit/delete topics/items. Previously I did it with ugly coding - with all the code pressed in the Topics controller. Now I am trying to make my application RESTful and stuck with many question marks. How can I render all the topics, items, and attachments in a single page. Previously I used lot of partials wherein main show page would call _topics partial and it would then call _items partial etc... Now with code being separated in different controllers I am not able to use partials. Is there anyway I can do it? Also how can configure my routes for this application. All I did was map.resources :topic, :has_many => items, but I am not sure whether I doing it right way. Any help appreciated. - CS. -- 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 [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 -~----------~----~----~----~------~----~------~--~---

