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: '097682a4841d7e8d6feb894f10d69a23fbc69b194d0e6ee89b5c0b1f611f9207'
4
- data.tar.gz: 912f7f209c84a5296209ebd004ece53f5d93bed67b1630478b1d5ff11f4bb5bc
3
+ metadata.gz: 02dee1a96852fb22105a7fe8a46a947a37148bef0d458ea3fad9ab06a30f4eee
4
+ data.tar.gz: 7c6987cf53fd0558d5633d5eeda283d9756b7e058ede0ce36b547872afb9d68c
5
5
  SHA512:
6
- metadata.gz: 3621c5b9f7ba2f7a1b71eb1be35055c50d62e94006fcf1c87157d842a3c0f0d323340df371cd04d013990ebdf7cc8cbf0af45ae817189f0260a2e31db69d71dd
7
- data.tar.gz: 6d6eb927c381fc9545e647243ce494aba5f3bdd7d5e2849c7246e8f820f9d015e8c0b5089ea95ac0d2fc1acf6867c95ea5d6b44b8b46276ac546d9ceb6d7c06e
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
- return unless @session.valid?
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
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.13.6"
2
+ VERSION = "3.13.8"
3
3
  end
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.6
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-05-31 00:00:00.000000000 Z
11
+ date: 2025-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails