I have a join table that has a through association between two other tables. This table has its own rails model representation and some fields that are not the the id’s of the other tables. Is it possible to update a record from the join table or should I consider creating a unique primary key?
If I try to “update_attributes” on the record I get the following error…
Unknown column 'join_table.' in 'where clause': UPDATE `join_table` SET `join_table_attribute` = 1 WHERE `join_table`.`` IS NULL
You can use
update_allfor that, e.g.: