On 5 March 2012 21:04, Colin Law <[email protected]> wrote: > On 5 March 2012 21:00, Felipe Pieretti Umpierre <[email protected]> wrote: >> Hello, I have two tables with association HABM, projects and users, and >> in projects I want to show all users that was associated to the project. > > If you have a project in @project for example, then to get all the > associated users you just use > @project.users > That is the magic of Rails. > > I suggest that you work right through a good tutorial such as > railstutorial.org (which is free to use online), then you will get a > grasp of the basics of Rails.
Also have a look at the Rails Guide on Associations, and all the others in fact. 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 [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.

