I have a model set out like so:
class Rating
# user_id, author_id
end
What I want to do is validate the author_id/user_id so they cannot be the same, essentially, so that a user cannot rate themselves.
Am I right to say this should be done using a validation in the Rating class?
validates :author_id, # custom validation options
You’ll need a custom validation: