flash_validators 3.0.3 → 3.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/flash_validators.rb +8 -2
- data/lib/flash_validators/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34f5cbfc9a87282bcc4fa119a4ab58804ddcb509
|
4
|
+
data.tar.gz: a07ef2eeeef5e42b5151d8fb35d2d264848d4678
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4078df459b4291ca1d1d984b74674c10aae8951be5d68e3935780f66dc090ec97dfb64e36d2aded821532f300d1d4320c3be360e7264b451c3120f459d123fb
|
7
|
+
data.tar.gz: 84862f4d15bce3fc2d922656e1f1ed85498ee9bcbca94b4d2b296ce3d5a7539dc7cb5be43f7275b7609fd4f5751394e86d84a960095a42ec6f2d41f7fbed06b3
|
data/lib/flash_validators.rb
CHANGED
@@ -67,9 +67,15 @@ if defined?(Rails)
|
|
67
67
|
class Railtie < ::Rails::Railtie #:nodoc:
|
68
68
|
initializer 'flash_validators' do |app|
|
69
69
|
FlashValidators::Railtie.instance_eval do
|
70
|
-
pattern = pattern_from
|
70
|
+
pattern = pattern_from(app.config.i18n.available_locales)
|
71
71
|
|
72
|
-
|
72
|
+
if pattern.blank?
|
73
|
+
add('*')
|
74
|
+
else
|
75
|
+
pattern.each do |locale|
|
76
|
+
add(locale)
|
77
|
+
end
|
78
|
+
end
|
73
79
|
end
|
74
80
|
end
|
75
81
|
|