Compound conditions in find

can’t seem to find the right syntax for this…

/script/…/config/…/app/controllers/placements_controller.rb:155:
syntax error
:conditions => [[“placements.client_id = ?”,
params[:client_id] ] and “placements.discharge_date IS NOT NULL” ],

this part works…
:conditions => [“placements.client_id = ?”, params[:client_id] ]

this is what I want to add…
“placements.discharge_date IS NOT NULL”

You can see above one of the many various ways I have tried to tie them
together to make a syntactically correct :conditions statement for a
find…

???

You’ll be happy to know that I got if/then/elsif/end worked out by
myself

:wink:

Craig

Yep…

I simply could not intuit anything close to that but now that I see it,
I realize that this is sort of a deference to sql.

Thanks

I have made heaps of progress

Craig

:conditions => [“placements.client_id = ? and
placements.discharge_date IS NOT NULL”, params(:client_id)]