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. > > I have try with this: > > <%= select( "user", "id", Project.all.collect { |p| [ p.name, p.id ] } ) > %> > > But only show all my projects, but Iz don't know who show only the user > in a determinated project.
The code you have will show all projects because you have specified Project.all. I don't understand exactly what you want to show. Do you want the users to appear in a select box or what? Do you have a particular project? Is it in a variable? Please be a bit more specific about what you want to see on the page. 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.

