Thanks for your help! So I'm trying to put this together, when I create a new unit in the units table I also want the unit_id field that is entered by the user to enter into the unit_id column of the rates table as well. I know this stuff is simple, I'm still learning, I've trolled through these forums but can't seem to find an answer. Any help is greatly appreciated.
This is what I have to enter into the unit_id column in the unit table: <% form_for(@unit) do |f| %> <p> <b>Unit</b><br /> <%= f.text_field :unit_id %> </p> Thanks! On Nov 13 2009, 8:15 am, Trausti Thor Johannsson <traust...@gmail.com> wrote: > 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 <ghollan...@gmail.com> 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.