view_component_reflex 2.3.6 → 2.3.7

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: e937fd7ba932deab56c293b8144506f734d1a4c5dc44e74d9facfcc07b789599
4
- data.tar.gz: f0fbd8dd07122877e370629f4d65387e79129c7b8b5528cb052b1040452d3f14
3
+ metadata.gz: 928f47f83cfe7da7261495c367ebd3690db92cddeb4c09ae0fa1e84f88f03cf4
4
+ data.tar.gz: 043a0dc613483eb6d072868fb1a83e00e7d10e1035d3de549e6a6a57f8d420f6
5
5
  SHA512:
6
- metadata.gz: 4d00f0ff02d17d4067436df5577de2aa84021ec28a509122bfef518862f46f77558c30745da154b56126b1506a056ff0abc4580a2f051d7f473b6b3f7b89b679
7
- data.tar.gz: 7217133fd36a2cc2d4fc6cba7fd6ebce9ee6e16a4935d54dcc8502beb9ca7bdc9620f1ae6c45ad29a590066b86c3fea27f5cb521ae90ca81ab26075e0a80595c
6
+ metadata.gz: 64834d62cc4b729be28f292297d4b73a2eac0654cf8ed99a8fdd28f84935825be14cf1d5722548c01c451d9079ed9ca96f6f05f3aef9907e9b53c1092e403895
7
+ data.tar.gz: 6e684ca6d8a49cb30267263b96830dc60af39c3db047fbdc0e2a0231dd6b321f7cb7b0eb80703336f3311b60e6088c2f28ef5cde12903d54850d3dc042a695fb
data/README.md CHANGED
@@ -324,7 +324,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
324
324
 
325
325
  ## Caveats
326
326
 
327
- State uses session to maintain state as of right now. It also assumes your component view is written with the file extension `.html.erb`
327
+ State uses session to maintain state as of right now. It also assumes your component view is written with a file extension of either `.html.erb`, `.html.haml` or `.html.slim`.
328
328
 
329
329
  ## Support me
330
330
 
@@ -35,12 +35,7 @@ module ViewComponentReflex
35
35
  end
36
36
  end
37
37
  document = Nokogiri::HTML(controller.render_component_to_string(component))
38
- cable_ready[channel.stream_name].morph(
39
- selector: selector,
40
- children_only: true,
41
- html: document.css(selector).inner_html,
42
- permanent_attribute_name: "data-reflex-permanent"
43
- )
38
+ morph selector, document.css(selector).inner_html
44
39
  end
45
40
 
46
41
  def refresh_all!
@@ -62,19 +57,7 @@ module ViewComponentReflex
62
57
  !!name.to_proc
63
58
  end
64
59
 
65
- # this is copied out of stimulus_reflex/reflex.rb and modified
66
- def morph(selectors, html = "")
67
- case selectors
68
- when :nothing
69
- @broadcaster = StimulusReflex::NothingBroadcaster.new(self)
70
- else
71
- @broadcaster = StimulusReflex::SelectorBroadcaster.new(self) unless broadcaster.selector?
72
- broadcaster.morphs << [selectors, html]
73
- end
74
- end
75
-
76
60
  def method_missing(name, *args)
77
- morph :nothing
78
61
  super unless respond_to_missing?(name)
79
62
  state.each do |k, v|
80
63
  component.instance_variable_set(k, v)
@@ -1,3 +1,3 @@
1
1
  module ViewComponentReflex
2
- VERSION = '2.3.6'
2
+ VERSION = '2.3.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component_reflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.6
4
+ version: 2.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua LeBlanc