On Wed, 14 Oct 2009, Manish Sharma wrote:

> Hi,
>
> Im using ActiveRecord to find something.
>
> <% @new = User.find_by_sql("SELECT * FROM users WHERE users.id NOT IN
> (array)") %>

With ActiveRecord you can use:

     User.all(:conditions => ["users.id NOT IN (?)", array])