view_component_reflex 2.1.3 → 2.1.4
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/README.md +1 -1
- data/app/components/view_component_reflex/component.rb +6 -6
- data/lib/view_component_reflex/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2fdf34d064e1a90d42f689dbeac337bfcefdecb34da14005a3333985de710d32
|
|
4
|
+
data.tar.gz: 8de6a22148047c13913d7363fb87c61cee167c7cb7d6b3ddc841f4d5af259233
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f4f49aca8e48a7addfdc6590cff4d2e8bf21c2aca5c9588af7ed673b90614f12d043cdfdd760a6653efaa6a064c536c693e1373be1d89130e78c4d21fc3845b
|
|
7
|
+
data.tar.gz: b0e40d72439efa641a044eef1c36842a6d3532a27ff6c029b7d0fa0798a61c72e468879289c5f85f4f2cb95db561c35f39af0d59653ad110e54f1ee2f620f35c
|
data/README.md
CHANGED
|
@@ -219,7 +219,7 @@ ViewComponentReflex uses session for its state by default. To change this, add
|
|
|
219
219
|
an initializer to `config/initializers/view_component_reflex.rb`.
|
|
220
220
|
|
|
221
221
|
```ruby
|
|
222
|
-
ViewComponentReflex.configure do |config|
|
|
222
|
+
ViewComponentReflex::Engine.configure do |config|
|
|
223
223
|
config.state_adapter = YourAdapter
|
|
224
224
|
end
|
|
225
225
|
```
|
|
@@ -2,10 +2,10 @@ module ViewComponentReflex
|
|
|
2
2
|
class Component < ViewComponent::Base
|
|
3
3
|
class << self
|
|
4
4
|
def init_stimulus_reflex
|
|
5
|
-
if name.include? "::"
|
|
6
|
-
|
|
5
|
+
@stimulus_reflex ||= if name.include? "::"
|
|
6
|
+
module_parent.const_set(name.split("::").last + "Reflex", Class.new(Reflex))
|
|
7
7
|
else
|
|
8
|
-
|
|
8
|
+
Object.const_set(name + "Reflex", Class.new(Reflex))
|
|
9
9
|
end
|
|
10
10
|
@stimulus_reflex.component_class = self
|
|
11
11
|
end
|
|
@@ -24,11 +24,11 @@ module ViewComponentReflex
|
|
|
24
24
|
init_key
|
|
25
25
|
|
|
26
26
|
tag = :div
|
|
27
|
-
if opts_or_tag.is_a? Hash
|
|
28
|
-
|
|
27
|
+
options = if opts_or_tag.is_a? Hash
|
|
28
|
+
opts_or_tag
|
|
29
29
|
else
|
|
30
30
|
tag = opts_or_tag
|
|
31
|
-
|
|
31
|
+
opts
|
|
32
32
|
end
|
|
33
33
|
options[:data] = {
|
|
34
34
|
controller: self.class.stimulus_controller,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: view_component_reflex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joshua LeBlanc
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-08-
|
|
11
|
+
date: 2020-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|