has_stimulus_attrs 0.2.1 → 0.2.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/.ruby-version +1 -1
- data/CHANGELOG.md +7 -1
- data/lib/has_stimulus_attrs/version.rb +1 -1
- data/lib/has_stimulus_attrs.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a3a965811c25f20f220e33a4d7e579081309e45501235c168238b8ed83db4b3
|
4
|
+
data.tar.gz: '0804e6cd1db9b7399bb70ec14e3df96b78a67bd84a92d6d799d39709924923cb'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 850a00e3ee81c9783f59711efdd2045b4405225dc424759c6f8a5071526187aa588f1e1136cd572ddaef16dc9b1134142eeaef4c17a69e5726eaa3e35a0d8a69
|
7
|
+
data.tar.gz: 9e81d373052c1861e0304beb023ce2b0ed0e345bcd844a7afcba10fe7dec2c9cdb7173fba46893339d83102b247f0bd2da56ea4c61484a820561f60675951ef8
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.5
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [0.2.
|
3
|
+
## [0.2.2](https://github.com/tomasc/has_stimulus_attrs/compare/v0.2.1...v0.2.2) (2025-01-31)
|
4
|
+
|
5
|
+
### Features
|
4
6
|
|
7
|
+
* allow has_stimulus_action to accept proc ([PR#6](https://github.com/tomasc/has_stimulus_attrs/pull/6))
|
8
|
+
|
9
|
+
|
10
|
+
## [0.2.0](https://github.com/tomasc/has_stimulus_attrs/compare/v0.1.0...v0.2.0) (2023-03-22)
|
5
11
|
|
6
12
|
### Features
|
7
13
|
|
data/lib/has_stimulus_attrs.rb
CHANGED
@@ -35,7 +35,13 @@ module HasStimulusAttrs
|
|
35
35
|
end
|
36
36
|
|
37
37
|
key = :action
|
38
|
-
val = -> {
|
38
|
+
val = -> {
|
39
|
+
a = case action
|
40
|
+
when Proc then instance_exec(&action)
|
41
|
+
else action.to_s
|
42
|
+
end
|
43
|
+
stimulus_action((controller || controller_name), event, a).values.first
|
44
|
+
}
|
39
45
|
|
40
46
|
prepend___has_stimulus___method(key, val, **options)
|
41
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_stimulus_attrs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-01-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: stimulus_helpers
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
|
-
rubygems_version: 3.5.
|
167
|
+
rubygems_version: 3.5.16
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: Helper methods for dealing with stimulus attributes.
|