view_component-live 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15f0780daa710f06f03b185800452e61c950a2c1c24829483df627a5ad592bc0
4
- data.tar.gz: f48fe82437ae5f18a74bfc27734b798d9914ff0d3374667abca0c1f831b00766
3
+ metadata.gz: aa81608a2ecdbce8d8ced8f474c0175d2313763d09058789c2328dabdbbff55c
4
+ data.tar.gz: 59f494c14808414b45f231fd7d6005008776b4afa5fae81103da43189ca07be7
5
5
  SHA512:
6
- metadata.gz: 6da365cd6e73595f444d2388eeb08bc4cc54ccd781a8b2260f86faf953b3c480c4db65c46e645677d768aa85c70b6e6c7259fb62596b808793cbe6be0cd706bb
7
- data.tar.gz: cf951d287fa7505e96034f19565a5bc744648b5e9b4601834944841a3baf9ae0ae7cecb797bf59f09d1403b13ffb533361ddd4423021f1ffeec4981a1cdd12ab
6
+ metadata.gz: d039cf57912234f24de997f678891d2f67c834c802fa0c2d32e3562c5fd35ad33d69d46ff3b62f57caafa34016800ab66058dcb62baca99bd366d074406f4750
7
+ data.tar.gz: 9c09688e495cee12d17211107285bb405f0d229acb98c1cc31c5b05fd53235edc253d46c70a0bd581cbec0b37206e4118f3a671408b9636fc64c7b74f44dd5bc
data/README.md CHANGED
@@ -86,4 +86,5 @@ The gem is available as open source under the terms of the [MIT License](https:/
86
86
  - find a way to do collection updates, a component that lists many items
87
87
  - could we do something for components that rely on multiple objects?
88
88
  - allow the listen to method to accept a list of attributes so we only get updates to relevant things
89
+ - enable the _live_ method to wrap component in any kind of tag
89
90
 
@@ -21,7 +21,7 @@ module ViewComponent
21
21
  # If we render the component in live update on cable we will not wrap it - we just need the component content.
22
22
  #
23
23
  def live
24
- return yield if live_render?
24
+ yield and return if live_render?
25
25
  # <div data-controller="live" data-live-component="UserCardComponent" data-live-id="<%= id %>">
26
26
  content_tag(:div, nil, data: {controller: :live, live_component: self.class.name, live_id: id}) { yield }
27
27
  end
@@ -1,5 +1,5 @@
1
1
  module ViewComponent
2
2
  module Live
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component-live
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Træls Ravn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-27 00:00:00.000000000 Z
11
+ date: 2020-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails