:include confused by true?

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.

I should mention rsvp only has two columns:

guest_id coming

:conditions => ["rsvps.coming = ?", true]

Otherwise, AR gets confused I think. The SQL might be valid.

-Rob

Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com

Thanks Rob,

That did the trick, knew I was doing something lame!