I am using Ruby on Rails 3.0.7 and I followed this post about handling an "has_many :through => checkboxes
" in which, in order to create user-group relationship records for membership purposes, is just passed a group_ids
parameter (that is an array of id values) from check box input fields to the @user.save
method. Using that code all works good in a "RoR magical\automatic way" (RoR set properly user_id
values in the related memberships
database table).
However, on saving, I would like to add some extra information to Membership
records. That is, (following that post content) when it creates the associated records in the memberships
database table (which database table has id
, user_id
and group_id
columns) I would like to save an extra description information (which, for example, can be represented by a description
column in that memberships
table).
Is it possible to accomplish that by keeping use of the "RoR magical\automatic way"?