globalize-validations 0.0.3 → 0.0.4

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: eb18d182cb0cb37a4b7c5ad1c32e46fc4c109214
4
- data.tar.gz: 330a35c6b3b43f9c9f8bd77bfaaa69dd33f657fc
3
+ metadata.gz: 1888302e58176ec5fcad83ef372fb4fd225f2d35
4
+ data.tar.gz: afea0cce2a0a76c164e0d9afa3372c66b40e5421
5
5
  SHA512:
6
- metadata.gz: af6571e1175b4ee533372d72c7f7de84327b40d5edf77cae87267a63e5197a1f22e3f83e819404aee2c22473c5acc55858c77495381d91ffabf1804117c1b1f3
7
- data.tar.gz: c42897687c909cd8ab70b7808d73a41ee8b0eb340fc852cd6066823be2b3368f94f958d90541c0c05528133b954a71792e384953fd551a9368644d7171d7e3aa
6
+ metadata.gz: 908386cf9a7812062605896e60567195605a6d265e605d8be7253d0943f0a299402fbd2c52e6ce66a77bad2f351e566aa52bd7849413e947873aab5833dddebf
7
+ data.tar.gz: 0f42c7011dd81c940f2f0a70f998eb9712300475c4f9af75cc6d947f32713113672b0d610e6fc3302b7228f7d5413c3b832529f05b0b1d6141a3712c9f480e9d
@@ -12,10 +12,10 @@ module Globalize
12
12
  return unless Globalize.locale == I18n.locale
13
13
 
14
14
  # Define which locales to validate against
15
- locales = if self.globalize_validations_locales.respond_to?(:call)
16
- self.globalize_validations_locales.call(self)
15
+ locales = if globalize_validations_locales.respond_to?(:call)
16
+ globalize_validations_locales.call(self)
17
17
  else
18
- self.globalize_validations_locales
18
+ globalize_validations_locales
19
19
  end
20
20
  locales ||= []
21
21
 
@@ -59,7 +59,7 @@ module Globalize
59
59
  {}.tap do |globalized_errors|
60
60
  translated_attribute_names.each do |attribute|
61
61
  if (error = errors.messages.delete(attribute.to_sym)).present?
62
- globalized_errors["#{attribute}_#{locale}".to_sym] = error
62
+ globalized_errors["#{attribute}_#{locale.to_s.underscore}".to_sym] = error
63
63
  end
64
64
  end
65
65
  end
@@ -1,5 +1,5 @@
1
1
  module Globalize
2
2
  module Validations
3
- VERSION = '0.0.3'
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: globalize-validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Grosjean
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-07-28 00:00:00.000000000 Z
13
+ date: 2014-07-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: globalize