That would work.  I like the idea of making my clients serial
monogamists.

However, it is a bit of a faff having to pass a date every time, or
perhaps I could write this into the has_many relationship.  Am I
missing something?

I've just added a version_id (populated with the version number)  to
the product_clients and added to the association:

  has_many :product_clients :dependent => :destroy, :conditions =>
'product_clients.version_id = #{self.send("version")}'
  has_many :products, :through => :product_clients

Does this seem sensible?

Mike



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to