lato 3.13.6 → 3.13.8
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: 02dee1a96852fb22105a7fe8a46a947a37148bef0d458ea3fad9ab06a30f4eee
|
4
|
+
data.tar.gz: 7c6987cf53fd0558d5633d5eeda283d9756b7e058ede0ce36b547872afb9d68c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb3d087629e470b6c8a3b7daf1ebfcab3963160c3ff95c4320ad91aa83a0c496f7ab9e7a06018177ea6e6d53c4d447685bb8caebb3b14b8a519be6661554fccf
|
7
|
+
data.tar.gz: aa1972629f670eabca6784b7c2b37749e5d15e71599e62ba3deb86bfdda2a5d0c5640f76b501b28a9d1e4668ff5474d47694d87b917ab176f4ebb9597048ac60
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module Lato
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
+
protect_from_forgery with: :exception
|
4
|
+
|
3
5
|
include Lato::Sessionable
|
4
6
|
include Lato::Layoutable
|
5
7
|
include Lato::Componentable
|
@@ -28,7 +30,6 @@ module Lato
|
|
28
30
|
|
29
31
|
def switch_locale
|
30
32
|
locale = I18n.available_locales.map(&:to_s).include?(params[:locale]) ? params[:locale] : I18n.default_locale.to_s
|
31
|
-
|
32
33
|
@session.user.update(locale: locale) if @session.valid?
|
33
34
|
cookies[:lato_locale] = { value: locale, expires: 1.year.from_now }
|
34
35
|
respond_to_redirect_same_page
|
@@ -46,9 +47,7 @@ module Lato
|
|
46
47
|
# This method set the default locale for the application.
|
47
48
|
# The default locale is the locale of the user if exists, otherwise is the default locale of the application.
|
48
49
|
def set_default_locale
|
49
|
-
|
50
|
-
|
51
|
-
I18n.locale = @session.user&.locale || cookies[:lato_locale] || I18n.default_locale
|
50
|
+
I18n.locale = (@session.valid? ? @session.user&.locale : nil) || cookies[:lato_locale] || I18n.default_locale
|
52
51
|
end
|
53
52
|
|
54
53
|
def respond_to_redirect_same_page(notice = nil)
|
@@ -10,7 +10,7 @@ user ||= Lato::User.new
|
|
10
10
|
<%= lato_form_errors user, class: %w[mb-3] %>
|
11
11
|
|
12
12
|
<div class="mb-3 text-center">
|
13
|
-
<p><%= raw I18n.t('lato.authenticator_code_help', email: user.email_protected) %></p>
|
13
|
+
<p><%= raw I18n.t('lato.authenticator_code_help', email: h(user.email_protected)) %></p>
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<div class="mb-3">
|
data/lib/lato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.13.
|
4
|
+
version: 3.13.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|