two things seem to equal, but the UNLESS statement passes anyway.

when params[:which_post] happens to equal the users last message, the
UNLESS staement on line 11 passes when in fact they both equal. I've
done testing and I know the params work and they do in fact equal each
other, but it still passes when it shouldn't.

Attachments:
http://www.ruby-forum.com/attachment/7986/code.txt

when params[:which_post] happens to equal the users last message, the
UNLESS staement on line 11 passes when in fact they both equal. I've
done testing and I know the params work and they do in fact equal each
other, but it still passes when it shouldn't.

nothing that is passed as a params will be typecasted as an integer so you
may need
to apply a .to_s to @message.id or .to_i to params[:which_post]

when params[:which_post] happens to equal the users last message, the
UNLESS staement on line 11 passes when in fact they both equal. I've
done testing and I know the params work and they do in fact equal each
other, but it still passes when it shouldn't.

nothing that is passed as a params will be typecasted as an integer so you
may need
to apply a .to_s to @message.id or .to_i to params[:which_post]

just a follow up, it is better to assign the records to an instance
variable in the controller.
something like

# setup which_post here
@messages = @user.messages.where('messages.id != ?', which_post)

and then just use @messages on the view