hola_milind_patel 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hola_milind_patel.rb +15 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c6be1c4465ef4cbf501816bcc347faa3e5146dabd0afaddf09cde9aee2fe2de
|
4
|
+
data.tar.gz: a1fc8a1cec059c0060feea4f6e5dc3d349b5f8bb2e96c999b6a4d5d68f769602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67a9aa01de28ffc8c00f8bdc9fcaaf4c7255f3bb029fd7143b656ecd25ce36d49742ee17f3097d2e63c86a2989033e7a214d53369925117d5e9a601b924446db
|
7
|
+
data.tar.gz: 526a0da5c68eed8dc12a885df105da81014bce403ebd7e3576e144f39bdc58c4493621bf56c5d377f28c821d9aa94b7bf210386de6ae349bafbee5a69dfc1d84
|
data/lib/hola_milind_patel.rb
CHANGED
@@ -78,4 +78,19 @@ module HolaMilindPatel
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
def self.strict=(strict)
|
82
|
+
RequestStore.store[:strict] = strict.present? ? strict : false
|
83
|
+
end
|
84
|
+
|
85
|
+
def self.language=(language)
|
86
|
+
Mobility.configure do |config|
|
87
|
+
config.default_backend = :key_value
|
88
|
+
config.accessor_method = :translates
|
89
|
+
config.query_method = :i18n
|
90
|
+
config.default_options[:fallbacks] = true
|
91
|
+
end
|
92
|
+
RequestStore.store[:selected_language] = language
|
93
|
+
locale = language == "all" ? I18n.default_locale : language
|
94
|
+
end
|
95
|
+
|
81
96
|
end
|