context_validations 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 +2 -2
- data/lib/context_validations/controller.rb +1 -1
- data/lib/context_validations/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1886594767f1f8f0d780368a10a173a2f9ce5149
|
4
|
+
data.tar.gz: 41eac3490683767852f92a55064003a213800583
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9358334e44c7103ddf6a47db980e4774ffe067fb4095afc7c1e2d5d0269257a82342d382ca58d0644c7c7a7232200046d1eeaaf159ae1e1a4f31c1ed33690307
|
7
|
+
data.tar.gz: 0750e6349b8b8d5a31f2333050295d12ad0a923b23ef414580638ae3b701d8731b77a95fc5a878e5101804de68f32c459914e1eabb1a92f89714cc78ee258841
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ In your `Gemfile`
|
|
18
18
|
gem 'context_validations'
|
19
19
|
```
|
20
20
|
|
21
|
-
You can either mixin the
|
21
|
+
You can either mixin the modules on a case-by-case basis or make the
|
22
22
|
changes global:
|
23
23
|
|
24
24
|
### Case-by-case ###
|
@@ -138,7 +138,7 @@ We highly recommend using [ValidAttribute](https://github.com/bcardarella/valid_
|
|
138
138
|
### MiniTest ###
|
139
139
|
|
140
140
|
You are given access to a `#validations_for(:action_name)` method. You should pass the action in your
|
141
|
-
controller that is the context of the validations and use the `#
|
141
|
+
controller that is the context of the validations and use the `#validations=` setter on the model.
|
142
142
|
|
143
143
|
This is a common example of how to test:
|
144
144
|
|
@@ -63,7 +63,7 @@ module ContextValidations::Controller
|
|
63
63
|
private
|
64
64
|
|
65
65
|
def _validates_default_keys
|
66
|
-
[:if, :unless, :on, :allow_blank, :allow_nil , :strict]
|
66
|
+
[:if, :unless, :on, :allow_blank, :allow_nil , :strict, :message]
|
67
67
|
end
|
68
68
|
|
69
69
|
def _parse_validates_options(options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: context_validations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Cardarella
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|