On 2 January 2011 14:29, bingo bob <lists@ruby-forum.com> wrote:
>> If what you want to do is store a set of values for something varying
>> over time and wish to query the set, pick out max and min and so on
>> then I suggest this is not best served by versioning. Instead model
>> it in the normal way. So App has_many price_tiers, PriceTier
>> belongs_to app, and a PriceTier has a date field you can query on.
>>
>> Colin
>
> Thanks Colin, realised this is the way to go.
> Unless I'm mistaken I can just use the created_at date field to query
> on?
If created_at suits your need then certainly.
Colin
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment