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 +4 -4
- data/lib/globalize-validations/concern.rb +4 -4
- data/lib/globalize-validations/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1888302e58176ec5fcad83ef372fb4fd225f2d35
|
4
|
+
data.tar.gz: afea0cce2a0a76c164e0d9afa3372c66b40e5421
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
16
|
-
|
15
|
+
locales = if globalize_validations_locales.respond_to?(:call)
|
16
|
+
globalize_validations_locales.call(self)
|
17
17
|
else
|
18
|
-
|
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
|
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.
|
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-
|
13
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: globalize
|