sexy_validations 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/sexy_validations.rb +6 -6
- data/sexy_validations.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.4
|
data/lib/sexy_validations.rb
CHANGED
@@ -62,28 +62,28 @@ module SexyValidations
|
|
62
62
|
unless validations.blank?
|
63
63
|
validations.each_pair do |validator, options|
|
64
64
|
klass = load_validator(validator)
|
65
|
-
self.validations += {
|
65
|
+
self.validations += [{
|
66
66
|
:attribute => attribute,
|
67
67
|
:validator => klass,
|
68
68
|
:options => options,
|
69
69
|
:conditions => conditions,
|
70
70
|
:conditions_if => conditions_if,
|
71
|
-
}
|
71
|
+
}]
|
72
72
|
end
|
73
73
|
else
|
74
74
|
if attribute
|
75
|
-
self.validations += {
|
75
|
+
self.validations += [{
|
76
76
|
:method => "#{attribute}_validation",
|
77
77
|
:conditions => conditions,
|
78
78
|
:conditions_if => conditions_if,
|
79
|
-
}
|
79
|
+
}]
|
80
80
|
else
|
81
81
|
raise ArgumentError, "at least a block has to be given" unless block_given?
|
82
|
-
self.validations += {
|
82
|
+
self.validations += [{
|
83
83
|
:block => block,
|
84
84
|
:conditions => conditions,
|
85
85
|
:conditions_if => conditions_if,
|
86
|
-
}
|
86
|
+
}]
|
87
87
|
end
|
88
88
|
end
|
89
89
|
end
|
data/sexy_validations.gemspec
CHANGED