Help with :conditions argument using find method

Hey guys,

I have got a simple statement below which will retrieve a users details
where a session has been set using their id. I want to know how I can
change the statement to say instead of find everything where the id
matches the session user_id to find everything where the id DOES NOT
EQUAL to the session user_id. It may seem like a small change but I have
no clue how to as I’m still new to RoR. Would appreciate nay
suggestions.

@active_user = User.find(:all, :conditions => {:id =>
session[:user_id]})

Regards

Raj

@active_user = User.find(:all, :conditions => [“id <> ?”,
session[:user_id]])

On Sep 11, 5:53 am, Rajeev A. [email protected]

Jeff Emminger wrote:

@active_user = User.find(:all, :conditions => [“id <> ?”,
session[:user_id]])

On Sep 11, 5:53 am, Rajeev A. [email protected]

Cheers mate did the trick.