Ruby on Rails Tuesday, December 28, 2010

On 28 December 2010 06:32, bingo bob <lists@ruby-forum.com> wrote:
> Thanks Walter, very clear and useful, it looks right for me - but two
> things.
>
> 1) Why does it create the user stuff in the vv migration/model - I dont
> have users in this app, should I delete those attributes or just not
> worry about them, and it'll just work (tm).
>
> 2) It seems to be more aimed at REVERTING to previous versions rather
> than querying them - to explain, in my app I'd like to keep a history of
> price tiers of apple store apps, so each day an App.tier might equal a
> different value, I might like to print them all out over time or chart
> them or more likely find an apps highest or lowest tier historically -
> is that easy/doable with VV?

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

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