Ryan Bigg wrote:
> Woah.
> 
> Firstly, why are you calling .collect on project.messages and
> everything? This is unnecessary.
> 
> Secondly, if messages is an association for a project it would be
> better if you used nested routes, as explained here: 
> http://guides.rails.info/routing_outside_in.html
> . Your controller would be called messages_controller and the action
> would be called index, not messages.
> -----
> Ryan Bigg
> Freelancer
> http://frozenplague.net

Thanks for your help.

Ive created a nested route, and now have my messages for the project 
which is fine. The next problem comes from getting the comments for each 
message in this index page.

I am not quite sure how I can retrieve the comments per message in the 
index in my controller....
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to