mikej wrote:
> I need to keep version of a model Client:
> 
>   has_many :product_clients
>   has_many :products, :through => :product_clients
> 
> The question is what is the best way of saving versions of the
> association.  Can I make the association using the client.version.id
> rather than the client.id?  Or should I use a bit mask?
> 
> Any thoughts much appreciated,
> 
> Mike

What about adding a datetime start and a datetime end to the 
product_clients model - expand it out to a full join table with 
additional attributes?  Don't delete the relationship, just end it. Then 
you could view which products a client had on any given date, today or 
in the past.
-- 
Posted via http://www.ruby-forum.com/.

-- 
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