WHERE NOT syntax with ActiveRecord

I need to run a sql statement along the lines of SELECT * FROM items
WHERE NOT … But I would like to run this in the ActiveRecord syntax. I
like using :conditions => […] but obviously where it renders ‘WHERE
NOT’ and not simply ‘WHERE’. I’d rather not use find_by_sql if at all
possible for security reasons. Anyone know how to do this?

Thanks,
Will

Thanks Eden.

Model.find(:all, :conditions => [‘NOT column = ?’, var])

On May 2, 12:05 pm, Will C. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs