My 2 pesos worth: The context of the phone number is at the time of booking, so put it there.
Then deal with the *could be the same as last time* issue ... Have a phone number attribute on the guest model. When presenting the booking form for a new one, pre-populate it's phone number with the latest number stored on the guest record. When saving a booking, update the guest phone number with the booking phone number, if they are different. That way the guest object always carries the last-known number and the bookings always carry the number that was correct at the time of booking ... sematically quite nice for very little complexity ... and you get a relatively simple form that helps the guest each time the make a new booking. On Thu, Jul 22, 2010 at 11:57 AM, Simon Russell <[email protected]>wrote: > It doesn't seem to get a lot of attention, but it can be pretty useful > (especially in this sort of situation); it can get a bit fiddly with > validations etc, but can be made to work nicely. I've used it before > for money/currency stuff, and addresses. > > On Thu, Jul 22, 2010 at 11:51, Scott Harvey <[email protected]> > wrote: > > I hadn't heard of composed_of before but it looks like that could > > definitely be used down the track to clean things up and avoid > > duplication. > > > > -- > > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]<rails-oceania%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rails-oceania%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" 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/rails-oceania?hl=en.
