sequel_sexy_validations 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -7,6 +7,8 @@ module Sequel
|
|
7
7
|
def self.validate(model, attribute, value, options)
|
8
8
|
return unless value
|
9
9
|
|
10
|
+
return unless model.changed_columns.include?(attribute)
|
11
|
+
|
10
12
|
unless model.class.filter(~:id => model.id, attribute => value).empty?
|
11
13
|
model.errors.add(attribute, "bereits vergeben")
|
12
14
|
end
|