validation_hints 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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: 70e978eeafefe43ecdd6e839270b02dcce985559b5e53f74f25f78554c2d7797
4
+ data.tar.gz: 1bbfb375b4ca43456e823ff30bd0d98ac6719114055276cdafb8f9bb121436d8
5
5
  SHA512:
6
- metadata.gz: 9694cfadd7496a46a5d5caa2277d5fb207c92c5bc4d1c29157dbdce441104abd263941e5261835da9a0263d64175df0ae7e8085dda3b2f0dd19ce660a95d21a7
7
- data.tar.gz: 87fda9cc0fe1029202354256e1d075f69e42a6923653ab98747118c79aa11b9a084c2625c1296bc2e07fd5ecbc78a9ecd8bff43c00545a4e1359f867f004d486
6
+ metadata.gz: 53067b662b9c4db01b83319d0f09bbceb09153f1c63c57e8a64905e858fa1bcdd20dc237a43ef02c36bba69838d30c03bfb717c2528a674b62b118f46895b32a
7
+ data.tar.gz: bcfa1937c2d921c549375d7a3543f4a7f278f17e9f447e7b67b867a8788561538ed483b8253bf296f1f0fb8733d8e5d195e21db8bf63c756421972827fdde919
@@ -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 = {})
@@ -306,12 +306,17 @@ module ActiveModel
306
306
 
307
307
  key = defaults.shift
308
308
 
309
- options = {
310
- :default => defaults,
311
- :model => @base.class.model_name.human,
312
- :attribute => @base.class.human_attribute_name(attribute),
313
- }.merge(options)
314
- I18n.translate(key, options)
309
+ # options = {
310
+ # :default => defaults,
311
+ # :model => @base.class.model_name.human,
312
+ # :attribute => @base.class.human_attribute_name(attribute),
313
+ # }.merge(options)
314
+ I18n.translate( key,
315
+ default: defaults,
316
+ model: @base.class.model_name.human,
317
+ attribute: @base.class.human_attribute_name(attribute),
318
+ count: options[:count],
319
+ )
315
320
  end
316
321
 
317
322
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module ValidationHints
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.3"
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.3
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.