swal_rails 0.5.1 → 0.5.2

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: 702ec3bf674332dffa1b5f0464a0078319d93728e3b2742b9b27386df24f3d27
4
- data.tar.gz: '0282ce37eadde45f551346a618def9bb5002360403d591c9056a5704e49b22c9'
3
+ metadata.gz: 2ef8664e41d7dfc5b012bacbb96a504664ae32c06f741349c47d37f05e5bd0bf
4
+ data.tar.gz: 733930aa44e423ee3af4e0e3bf90466c069d64cd98b51926456352a85810c6bb
5
5
  SHA512:
6
- metadata.gz: e35beb8f79b5856e8ecec2f2de3187f340ae2b3fce4de90dae82717fa7aceb7f81d02c89b6b3983e0a83662022fa9a7e792406426f7cceb55e9b82d19725214c
7
- data.tar.gz: fc87e31a32c9b9c17f7591f8393f57afc6ac27859d5c9dd49e44fa01818e86dfb2c4b8c4183d342f9c9fec577d0efbf2b10ee4daab96929484ced892f2b3628a
6
+ metadata.gz: d2853982d0e80c7e135e8ed4813d1e8aa127801215da720067ea660600f48c1dc719c7c68dff73c5ae77d879cd4d00e75fd63007958015c772bb0e3c7594aafc
7
+ data.tar.gz: d703a699653f4c6f7d962244bc26cfb9dae7da07fbdeca7842f9d9f5df5c4d2ac008ac44801087920184949d6beb83a9a9dff8ce877582ef440e4e4396667e06
data/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.5.2] - 2026-05-28
10
+
11
+ ### Fixed
12
+ - **`turbo_stream.swal_flash` key resolution** — `flash_map` stores Symbol keys
13
+ but `swal_flash` was fetching with `key.to_s`, always missing and emitting a
14
+ tag without `icon`/`toast`/`position`/`timer`. Changed to `key.to_sym`.
15
+ Closes [#29](https://github.com/Metalzoid/swal_rails/issues/29).
16
+
9
17
  ## [0.5.1] - 2026-05-28
10
18
 
11
19
  ### Added
@@ -26,7 +26,7 @@ module SwalRails
26
26
  # turbo_stream.swal_flash(:notice, "Élément créé avec succès")
27
27
  # turbo_stream.swal_flash(:error, "Échec", timer: 0)
28
28
  def swal_flash(key, message = nil, **overrides)
29
- base = SwalRails.configuration.flash_map.fetch(key.to_s, {}).dup
29
+ base = SwalRails.configuration.flash_map.fetch(key.to_sym, {}).dup
30
30
  base = base.merge(text: message) if message
31
31
  base = base.merge(overrides) unless overrides.empty?
32
32
  swal(base)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SwalRails
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.2"
5
5
  SWEETALERT2_VERSION = "11.26.24"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swal_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Gagnaire