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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1424b1f08a935abadf39c414affcef49d6531a9e
4
- data.tar.gz: 40cc4ff506d51660af10a69b995f9b36d0c03dad
3
+ metadata.gz: 0c6623dc8c852992a0f49b9bed389053689c8e8f
4
+ data.tar.gz: aa122d508a3b8ab1dfc0430e758b8f168eab9a04
5
5
  SHA512:
6
- metadata.gz: 8a3ffd1f57440d0d716e4af3759e892a4cb67a8f9b79160af4a60d854a9f49ad464ef11759ee7ef6cfcf0d9094d452ca972af5f79fdc098d0771682996a434fb
7
- data.tar.gz: fd881d54b1ed4afe2d1a0fa0c73162d46658cab1312d12c43cf36175c34c55cbafb5a3b39e349b5b7a0c13d5e6ef289bbcbf195fa9eaaacdf40d878d7c5288f7
6
+ metadata.gz: 2e29b640966507a832e0b0c4bdc298927bb3fa9a84a605bb2b125b5164580f41d609145c7b373923aef0159f64636f1e7c46c4b5a53dabc473a2a4a25e3ab12d
7
+ data.tar.gz: 30f121730a7d69c2a184e242bcec1742da801f7000da24f7155ea239442d4bf4a2907d23cd1b0cfb73ad2daa85ac44a84139e8c82934f22226df27582f98b5e3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- adequate_errors (0.1.0)
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.10.3)
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)
@@ -1,3 +1,3 @@
1
1
  module AdequateErrors
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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: 2017-12-14 00:00:00.000000000 Z
11
+ date: 2018-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel