active_comparison_validator 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/active_comparison_validator/version.rb +1 -1
- 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: d3c7d9d23c401e33f9d225d1e9e708e2d085edc7
|
4
|
+
data.tar.gz: ae869f414ddfb8b95884266a6cda578301aad729
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25cb15bbe0b03a3e5e6b263a34197a1534ea27b185dca7ff65e92a79dc4998716381d6a23aa6adaad210fd116b9d433ae2d4aead817050b164aa3ca95e01d41b
|
7
|
+
data.tar.gz: 79fe2037f13ad74b52c54f53e33349e28bc2cf8a9b66c96c657f937554d836e3c9a1a53b0c68fc1ceff4fd3bc9e22fc256fc19f886d5631ce59d2cc5fb31d679
|
data/README.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
Dynamically add validation for compare the column and the other column.
|
4
4
|
|
5
|
+
```rb
|
6
|
+
class Shop < ActiveRecord::Base
|
7
|
+
include ActiveComparisonValidator
|
8
|
+
comparison_validator 'open_at < close_at'
|
9
|
+
end
|
10
|
+
```
|
11
|
+
|
5
12
|
This gem provides a macro for comparing the column and the other column of the record.
|
6
13
|
Type of the comparable column is Date Time Numeric, and all that jazz.
|
7
14
|
|