Jeremy Cowgar
2006-Mar-24 18:25 UTC
[Rails] Has and belongs to many ... howto in the view?
I have a project, it has members. I have the data modeled, the ActiveRecord setup but I''m running into a block as how to accomplish this in a view. I would like if when the Project is being edited to present a list of all users, and then have a checkbox beside each name. Those selected would be a member, those who are not, obviously would not be. I am, however, not closed to other ideas. Basically, I''m just not sure how to implement the view. Is there a Howto, tutorial or something in regards to this? Thanks, Jeremy
curtis.hatter@insightbb.com
2006-Mar-24 19:12 UTC
[Rails] Has and belongs to many ... howto in the view?
Take a look at this: http://jrhicks.net/Projects/rails/has_many_and_belongs_to_many.pdf A google search for "has and belongs to many checkbox" (w/o quotes when put into search) turns up a couple other urls that may be of interest. One of which points to the rails Wiki. Curtis> I have a project, it has members. I have the data modeled, the > ActiveRecord setup but I''m running into a block as how to accomplish > this in a view. I would like if when the Project is being edited to > present a list of all users, and then have a checkbox beside each > name. Those selected would be a member, those who are not, obviously > would not be. I am, however, not closed to other ideas. > > Basically, I''m just not sure how to implement the view. Is there a > Howto, tutorial or something in regards to this? > > Thanks, > > Jeremy > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails