Simple. Two tables.
Rooms : Has info like double bed, fridge, size and such. costs : <---- might need a better name room_id day price Then you would say something like room has many costs And then I would just use julian dates and you can easily ask each room for dates in a given range. Trausti On Fri, Nov 13, 2009 at 6:28 AM, Greg <[email protected]> wrote: > > Hi, I'm trying to make an app for a small hotel where I could load > rooms into a database then assign a different nightly rate to them for > each day in a calendar year. Each room would be loaded individually > into the DB and and have it's own rate, you would then be able to > search for a room by entering a date rang, the app would display all > available rooms and the total nightly rate > I'm not sure what the best practice to set this up would be. Does > anyone know of an example app I could look at? > > Thanks for your help - Greg. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

