I need to validate the uniqueness of two fields in an object (row) before I add them. Employee_id and area_id are the two fields in my emp_area table. There can be multiple re
validates_uniqueness_of :employee_id, :scope => :area_id
what about this solution Validate combined values
validates :employee_id, uniqueness: { scope: :area_id }