Ok... it's actually working now.

I was getting a nil object because some theaters have a status_id of 0. (I know... but I was a SQL newbie when I built the db schema five years ago.)

When I added a '0' record to my status table, everything started working (since there's now a matching object in the db).

Best,
Patrick


On Nov 6, 2006, at 3:03 pm, Patrick Crowley wrote:

Here's the code I'm using to pull in the results...

      @pages, @theaters = paginate(:theaters,
:conditions => ["name_present LIKE :name_present or name_past LIKE :name_past", { :name_present => "[EMAIL PROTECTED]", :name_past => "[EMAIL PROTECTED] %" }], :order => 'submit_time DESC', :per_page => 25, :include => [:status])

...

I just added the :include but it doesn't seem to work.

-- Patrick


On Nov 6, 2006, at 2:44 pm, Chris Abad wrote:

Hmm... seems weird. Do you want to pastie some code?
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to