validation_profiler 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/validation_profiler/version.rb +1 -1
- data/lib/validation_profiler.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc1402be1d084455b493173d1ef7c46c1e41a15e
|
4
|
+
data.tar.gz: e6fa95cbf2ff55f75708e184811fa4b8dc399f53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f7b57a394eac4212a9f258ee6e6f4d7c6756d31f4a207d97c4961ef362d8babcfae28265d1b48b893142082e4bed15b0c9f43f5b36cb5b4dc489046b5ac91b9
|
7
|
+
data.tar.gz: ea770e0ef033ac41aa13977cab161fd172b7cfc252d4ebeb6e12d17b9ad3c5fa5ca34de3ffd56820f3704cacce390e6c943d506d18b688402d74731586e569f4
|
data/lib/validation_profiler.rb
CHANGED
@@ -7,8 +7,8 @@ class Class
|
|
7
7
|
#
|
8
8
|
# @param field [Symbol] The name of the field to validate
|
9
9
|
# @param rule [Symbol] The name of the validation rule to use
|
10
|
-
# @param attributes [Hash] A has containing the validation rule options
|
11
|
-
def validates(field, rule, attributes)
|
10
|
+
# @param attributes [Hash] [Optional] A has containing the validation rule options
|
11
|
+
def validates(field, rule, attributes = {})
|
12
12
|
|
13
13
|
if !defined?(self.validation_rules)
|
14
14
|
self.class_variable_set(:@@validation_rules, [])
|