[Locomotive-users] Problem with :belongs_to relation
Samuel Linde
samuel.linde at gmail.com
Mon Feb 26 20:35:25 GMT 2007
> So does this work ok?
>
> Booking.find(:all).each { |b| puts b.customer.company_name unless
> b.customer.nil? }
Yes, it prints out the company_name nicely.
> How about this?
>
> nil_bookings = Booking.find(:all).select { |b| b.customer.nil? }
Empty array. Therefor,
> nil_bookings.size
returns 0.
So, do you is it a problem with mongrel? I'm using the latest RMagick
bundle from the Locomotive website. I've tried with the latest edge
as well, nothing seems to help.
Isn't it odd that it works the first time I call the method, but all
the subsequent returns an error?
Is there something else I could try in the db schema? Should I add
foreign key restraints?
Thanks.
/Samuel
>
> I suspect things are working Ok on the Rails end of the world for you.
>
> --Steve
>
> _______________________________________________
> Locomotive-users mailing list
> Locomotive-users at lists.raaum.org
> http://lists.raaum.org/mailman/listinfo/locomotive-users
More information about the Locomotive-users
mailing list