stimulus_tag_helper 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stimulus_tag_helper/version.rb +1 -1
- data/lib/stimulus_tag_helper.rb +6 -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: 884fa188e7ce8465fe8b7a33f0fd95f38c689dd33d548aecc23c83d6dd7e005a
|
4
|
+
data.tar.gz: 97cce9dbe7b99e3bd40a5f31d07691636d367d9cf7ee2d673bba8764209c3e46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abfcfb468f4f6ffe8436edcc2732fe565e0b402aedc8f3156a17f07f2b905f3cea091c7b3e24b389b0b1429b3916e7f533529dab3b582a6bd756afe03072c4ae
|
7
|
+
data.tar.gz: aac053f558ca00ae6cf6989581f74bf00f884c6847c95980cfcffdcb64eedafc33d794f5aa0a0bfc704ab5d18ac30bde186151f622cdc2b6b1b92702e3b55777
|
data/lib/stimulus_tag_helper.rb
CHANGED
@@ -5,6 +5,7 @@ require "zeitwerk"
|
|
5
5
|
Zeitwerk::Loader.for_gem.setup
|
6
6
|
|
7
7
|
module StimulusTagHelper
|
8
|
+
TAG_BUILDER_OPTIMIZED_VERION = Gem::Version.new("7.2.0")
|
8
9
|
def self.properties
|
9
10
|
%i[controllers values classes targets actions outlets].freeze
|
10
11
|
end
|
@@ -64,7 +65,11 @@ module StimulusTagHelper
|
|
64
65
|
controller: data[:controller] || controller, # nil is allowed, because the args will be prepended by the identifier
|
65
66
|
**args.extract!(*StimulusTagHelper.all_possible_properties_names - %i[class])
|
66
67
|
))
|
67
|
-
|
68
|
+
if ActionView.version >= TAG_BUILDER_OPTIMIZED_VERION
|
69
|
+
tag_builder.tag_string(tag, nil, args.merge(data: data), &block)
|
70
|
+
else
|
71
|
+
tag_builder.tag_string(tag, **args.merge(data: data), &block)
|
72
|
+
end
|
68
73
|
end
|
69
74
|
|
70
75
|
def stimulus_attributes(...)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stimulus_tag_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Topchii
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
|
-
rubygems_version: 3.
|
91
|
+
rubygems_version: 3.5.21
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: A form_for like, compact and elegant way to define stimulus attributes in
|