Hi,
I have the following situation
class RecordA
has_many :recordbs
end
class RecordB
belongs_to :recorda
end
RecordA has many recordbs but only one of them may be an active recordb. I need something like myRecordA.active_recordb
If I add a new column like is_active
to RecordB, then I have the potential problem of setting two records to is_active = true
at the same time.
Which design pattern can I use?
Thanks!