Displaying 4 results from an estimated 4 matches for "booking_id".
Did you mean:
bonding_id
2006 Feb 08
1
Weird validation issue
...;')
end
end
but that had exactly the same effect.
Interestingly enough, it got through the code to the exact same point
as it would if it had actually added the camper to the booking.
Looking at the DB, the camper record was there but didn''t have
anything for contact_id or booking_id.
if !camper_already_attending && @contact.save && @camper.valid? &&
(@camper.contact = @contact) # (Yes, that last equal should
definitely be a single one!)
unless @booking.contactslist.include?( @contact.id )
# Need to add a role of "SU Camper"...
2006 Jul 31
0
Polymorphic has_many association through a belongs_to
...owing Models and their relative associations:
Seat
----
belongs_to :booking
Booking
-------
has_many :seats
has_many :debits, :as => :chargeable
Debits
------
belongs_to :chargeable, :polymorphic => true
Why
>> seat.booking.debits
nil
while
>> Booking.find(seat.booking_id).debits
[]
?
Thanks.
Cheers,
Marco
--
Posted via http://www.ruby-forum.com/.
2006 Feb 07
0
complicated search/model question
..._table "jobs", :force => true do |t|
t.column "created_at", :datetime
t.column "updated_at", :datetime
t.column "contractor_id", :integer
t.column "date_time", :datetime
t.column "duration", :float
t.column "booking_id", :integer
t.column "confirmed", :datetime
t.column "cancelled", :datetime
end
create_table "contractors", :force => true do |t|
t.column "created_at", :datetime
t.column "updated_at", :datetime
t.column "first_...
2006 Feb 20
9
a complex availability problem
Ok, this is a hard one and I just thought I''d see if people on the
list had any suggestions on how they would approach this, I''ve not
started to implement the rails to handle this yet as I''m still at the
paper planning phase.
I''m building an app that has to handle availability for travel packages.
The complexity comes in that a person can choose a start