validation_hints 0.2.1 → 0.2.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
- SHA1:
3
- metadata.gz: 6681ac8fb914645988dbc52207a2b3d1532d0bfe
4
- data.tar.gz: f628400d9f2a7c3930316289ae13dc1140cea4b6
2
+ SHA256:
3
+ metadata.gz: 9cf32471d0a80a02b0a5db3b89ba7564d5fa92e00e2e2bcb2e28f04a4b462d04
4
+ data.tar.gz: 044bd3521b06d203e01dc40084cfa1d0cf9e09c52b33be24e1067f7b692cfa77
5
5
  SHA512:
6
- metadata.gz: 9694cfadd7496a46a5d5caa2277d5fb207c92c5bc4d1c29157dbdce441104abd263941e5261835da9a0263d64175df0ae7e8085dda3b2f0dd19ce660a95d21a7
7
- data.tar.gz: 87fda9cc0fe1029202354256e1d075f69e42a6923653ab98747118c79aa11b9a084c2625c1296bc2e07fd5ecbc78a9ecd8bff43c00545a4e1359f867f004d486
6
+ metadata.gz: daa31a4cb817fe4cef08124e970d2a5a02c8f6c8350441486f817354e011b3d7bc18690f089da18d31e9443db4ebb7b278433e8280de156f5b6a895514812f1f
7
+ data.tar.gz: 0b2b921d259e537178a4675d787fda8632ae87ed90a7f356e82a47768892802d3ce0f6c99993d6856468e68e986cbd49975267044706ff2c4994dc7e669e93e9
@@ -278,11 +278,11 @@ module ActiveModel
278
278
  return message if attribute == :base
279
279
  attr_name = attribute.to_s.gsub('.', '_').humanize
280
280
  attr_name = @base.class.human_attribute_name(attribute, :default => attr_name)
281
- I18n.t(:"hints.format", {
281
+ I18n.t(:"hints.format",
282
282
  :default => "%{attribute} %{message}",
283
283
  :attribute => attr_name,
284
284
  :message => message
285
- })
285
+ )
286
286
  end
287
287
 
288
288
  def generate_message(attribute, type, options = {})
@@ -311,7 +311,11 @@ module ActiveModel
311
311
  :model => @base.class.model_name.human,
312
312
  :attribute => @base.class.human_attribute_name(attribute),
313
313
  }.merge(options)
314
- I18n.translate(key, options)
314
+ I18n.translate(key,
315
+ :default => defaults,
316
+ :model => @base.class.model_name.human,
317
+ :attribute => @base.class.human_attribute_name(attribute),
318
+ )
315
319
  end
316
320
 
317
321
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module ValidationHints
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_hints
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-30 00:00:00.000000000 Z
11
+ date: 2023-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails
@@ -117,8 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubyforge_project: validation_hints
121
- rubygems_version: 2.4.6
120
+ rubygems_version: 3.2.3
122
121
  signing_key:
123
122
  specification_version: 4
124
123
  summary: Validation Hints.