I have a Comment model and I want to check one attribute of an instance to ensure they aren't equal.
Comment.where.not(user_id: :post_user_id).find_each do |order|
#
end
This isn't working though. When I run this, I seem to get no results, when I should get one.
I also tried comment.post_user_id and self.post_user_id, but neither worked.
Thanks in advance!
Edit - This got closed for lack of detail.
I'm unsure what to add for details. The Comment model has both the post_user_id and user_id attributes.