lib/spira/validations/uniqueness.rb in spira-3.1.0 vs lib/spira/validations/uniqueness.rb in spira-3.1.1

- old
+ new

@@ -15,10 +15,10 @@ @klass = options.fetch(:class) end end def validate_each(record, attribute, value) - @klass.find_each(:conditions => {attribute => value}) do |other_record| + @klass.find_each(conditions: {attribute => value}) do |other_record| if other_record.subject != record.subject record.errors.add(attribute, "is already taken") break end end