adequate_errors 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/adequate_errors/error.rb +5 -1
- data/lib/adequate_errors/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: 0c6623dc8c852992a0f49b9bed389053689c8e8f
|
4
|
+
data.tar.gz: aa122d508a3b8ab1dfc0430e758b8f168eab9a04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e29b640966507a832e0b0c4bdc298927bb3fa9a84a605bb2b125b5164580f41d609145c7b373923aef0159f64636f1e7c46c4b5a53dabc473a2a4a25e3ab12d
|
7
|
+
data.tar.gz: 30f121730a7d69c2a184e242bcec1742da801f7000da24f7155ea239442d4bf4a2907d23cd1b0cfb73ad2daa85ac44a84139e8c82934f22226df27582f98b5e3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
adequate_errors (0.1.
|
4
|
+
adequate_errors (0.1.2)
|
5
5
|
activemodel
|
6
6
|
|
7
7
|
GEM
|
@@ -19,7 +19,7 @@ GEM
|
|
19
19
|
diff-lcs (1.3)
|
20
20
|
i18n (0.9.1)
|
21
21
|
concurrent-ruby (~> 1.0)
|
22
|
-
minitest (5.
|
22
|
+
minitest (5.11.1)
|
23
23
|
rake (10.5.0)
|
24
24
|
rspec (3.7.0)
|
25
25
|
rspec-core (~> 3.7.0)
|
@@ -92,7 +92,11 @@ module AdequateErrors
|
|
92
92
|
model: @base.model_name.human,
|
93
93
|
attribute: humanized_attribute,
|
94
94
|
value: value,
|
95
|
-
object: @base
|
95
|
+
object: @base,
|
96
|
+
exception_handler: ->(exception, locale, key, option) {
|
97
|
+
rails_errors = @base.errors
|
98
|
+
rails_errors.full_message(@attribute, rails_errors.generate_message(@attribute, @type, @options))
|
99
|
+
}
|
96
100
|
}.merge!(@options)
|
97
101
|
|
98
102
|
I18n.translate(key, i18n_options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adequate_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lulalala
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|