beyond_canvas 0.13.0.pre → 0.13.1.pre
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b251444a9c8422914b644276a9092df58d0678f2b26afacf1460b2a9505ad833
|
4
|
+
data.tar.gz: c7fe8d4689dca6b5c23a967619e59f72a615e1a42f908b5fda345a7e0b8d4c72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31ed5d0a6dbce63e91ccfbc240e4bbb2a3b835bebe2f1735b9a3e4491b7e87cec02e7bbd03809838494a2dcdf66879f1ca17f60a4feb05431e695475e0b9776b
|
7
|
+
data.tar.gz: 2a9e47666a44a7d4c8782c9a6f9bca1b15d68a271302ef765155106d8039c95d855e4cff7095584f4c1dc827c2424dddd7fae7deec4befb28ba3be7950c1d937
|
@@ -15,6 +15,9 @@ module BeyondCanvas
|
|
15
15
|
# browser compatible locale, sets the value to the cookie and set that locale as default locale.
|
16
16
|
#
|
17
17
|
def switch_locale(&action)
|
18
|
+
# NOTE: Check the HTTP_ACCEPT_LANGUAGE header to identify if the request comes from a browser or a server
|
19
|
+
return I18n.with_locale(I18n.default_locale, &action) if request.headers['HTTP_ACCEPT_LANGUAGE'].blank?
|
20
|
+
|
18
21
|
unless valid_locale?(cookies[:locale])
|
19
22
|
cookies[:locale] = { value: browser_compatible_locale, expires: 1.day.from_now }
|
20
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_canvas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.1.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unai Abrisketa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: beyond_api
|