I need to do validation on my model on Ruby on Rails.
I have model with 2 fields:
user_id some_item_id
And I have many rows in DB with the same user_id, but with different some_item_id. And I need avoid duplication of this some_item_id towards to specific user_id.
In Rails exist some 'magic' validation in one line for this?