Ramon Tayag wrote: > Book having many :prices does make sense. That way you get to keep > the history of the price of the book. Of course, the latest price in > the association is the current price. > > Ramon Tayag
The problem with that is to get the current price (most uses cases) I have to scan the entire 'prices' table. I'd rather do it in such a way that it only saves the current price, year, edition, etc. to a "stats" whenever the book is updated (without any explicit association). -- 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 -~----------~----~----~----~------~----~------~--~---

