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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/swal_rails/turbo_stream_helper.rb +1 -1
- data/lib/swal_rails/version.rb +1 -1
- 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: 2ef8664e41d7dfc5b012bacbb96a504664ae32c06f741349c47d37f05e5bd0bf
|
|
4
|
+
data.tar.gz: 733930aa44e423ee3af4e0e3bf90466c069d64cd98b51926456352a85810c6bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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)
|
data/lib/swal_rails/version.rb
CHANGED