DamnBigMan
(DamnBigMan@gmail.com)
1
I have two models:
guest
rsvp
guest belongs_to rsvp and rsvp has_one guest
When I try the following I get an error:
@coming = Guest.find(:all, :conditions => ["coming = ?",
true], :include => :rsvp)
It complains of an unknown column 'coming'
I'm sure I'm doing something stupid but I can't see it. Any help
would be appreciated.
DamnBigMan
(DamnBigMan@gmail.com)
2
I should mention rsvp only has two columns:
guest_id
coming
rab
(Rob Biedenharn)
3
:conditions => ["rsvps.coming = ?", true]
Otherwise, AR gets confused I think. The SQL might be valid.
-Rob
Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com
DamnBigMan
(DamnBigMan@gmail.com)
4
Thanks Rob,
That did the trick, knew I was doing something lame!