Displaying 2 results from an estimated 2 matches for "join_attributes".
2006 Jan 25
2
Update join_table attributes
...documented shortcoming,
and
the solution everyone talks about is to override the update_attributes
code.
The code (see the comments @ http://tinyurl.com/ey5qd) starts like so:
module ActiveRecord
module Associations
class HasAndBelongsToManyAssociation
def update_attributes(record, join_attributes = {})
The problem is, and here is why I''m writing, that this code isn''t called
when you call update_attributes. In fact, if you go and edit the file
that
defines HasAndBelongsToManyAssociations and you put in a method "foo"
and
call it, it won''t be called ei...
2006 Jan 29
9
Specify options with habtm
Hi all
I have the following models:
class member
has_and_belongs_to_many :disc_jockeys
end
class disc_jockey
has_and_belongs_to_many :members
end
The relation table is called disc_jockeys_members and has the following
fields:
disc_jockeys_members(disc_jockey_id, member_id, status)
So far, the field status can have values like valid, invalid, locked
etc., but it is not regarded yet by