Active record uniqueness validations with a given scope 20 December 2022·2 mins petrohalimurka development rails active record validations uniqueness scope ruby