activerecord-bixformer 0.3.15 → 0.3.16

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: 3f01693f660044a5525f58f16dd698592480bc06
4
- data.tar.gz: 8979a127642477cff7d2109741e5fb804f4b8ee0
3
+ metadata.gz: 6f547ae90489b5f2aef0914a5730dffce3354399
4
+ data.tar.gz: 797acc403c81992e1f5f3b5a886ec3dbabf25e10
5
5
  SHA512:
6
- metadata.gz: 8b2efea428c70c3541e1df35bdc1c4884897db7d3b73fb5e96d1f90d27a5ce9e10df7ef79e106ca59056ddbefeb4b17200e0ccbcf52c0915a6493c41137df5e9
7
- data.tar.gz: 4cdf32ae98d87d3c06848b74ba08dfdd7377bf71583622738c62d800205538505e333a341322822eaea120d407535918b4f69ae6549002f5e30757d8bee41dee
6
+ metadata.gz: 7b899f99643b000fa4c6c70eee259706db52cf1884f0c799a4b9c4cf790711ff71c533db1e6b1818f6e5a3cc2a0afc9c3fe3ac80c0bfcf9982a6f8bcda84ed22
7
+ data.tar.gz: 929768ac1b7fc4795b3c27755d75ab5892594ff5e6b929db64bdb396b19a8f79568c85832caa168829ad1beda774e796486e36b55dfe15410696a96a1d7e9a3f
@@ -22,19 +22,13 @@ module ActiveRecord
22
22
 
23
23
  class AttributeError < ::StandardError
24
24
  def initialize(attribute, value, type)
25
- @attribute = attribute
25
+ @attribute = attribute.model.translate(attribute.name)
26
26
 
27
27
  super(generate_message(attribute, type, value))
28
28
  end
29
29
 
30
30
  def full_message
31
- options = {
32
- default: "%{attribute} %{message}",
33
- attribute: @attribute.model.translate(@attribute.name),
34
- message: message
35
- }
36
-
37
- I18n.t(:"errors.format", options)
31
+ I18n.t(:"errors.format", default: "%{attribute} %{message}", attribute: @attribute, message: message)
38
32
  end
39
33
 
40
34
  private
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Bixformer
3
- VERSION = "0.3.15"
3
+ VERSION = "0.3.16"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-bixformer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.15
4
+ version: 0.3.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroaki Otsu