view_component 2.62.0 → 2.63.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of view_component might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e57d7d7eece678a577cf5f89f4b506fbe1026c79cc8b28d269e6984a01de29c7
4
- data.tar.gz: e8fd167897e4bbcfaf0b4d657605acf26a5e1c6dc72e6fd5a868e0e0e76d232b
3
+ metadata.gz: 78c8a36fb19eb4c8a1c3737815113323acc9cd5a9c89a270163ca8336e44c41e
4
+ data.tar.gz: 6e4135faf54dfc7c519d7ef62080d6e779d04bbbc1efea32b7871fe65bd2c685
5
5
  SHA512:
6
- metadata.gz: a6bae85903899c93cb78e11a49082c4e6c2393605c9b3e94cca98ecff1e790a97dd7acda4c5e13b11ad4e4591384d0d30e62d86831998577531b595378f9fcb7
7
- data.tar.gz: 814913871cc0d5b4865a6864a0585f06d6c26088cdbab888e4c4d33787f7ab2e74c9dafffd52fe726999d03b9a453186b3f495afc1c0c9da5207b5edb3a89480
6
+ metadata.gz: 0f207e3d9e6980880876afa36521a3f63abafead81da8d4f5574c9e9164139fbd8029bf8b9eae3f034e2da849541b959025612b21dca548477a38327fe5aa97b
7
+ data.tar.gz: d65662034f4abf33feeae814b60dcfb82683302be1cf427a5c6f93297a575185963ca8d3a1df81fa9daf7855d25297c303c68e5abc225594be842e12fd657702
data/docs/CHANGELOG.md CHANGED
@@ -9,6 +9,20 @@ title: Changelog
9
9
 
10
10
  ## main
11
11
 
12
+ ## 2.63.0
13
+
14
+ * Fixed typo in `renders_many` documentation.
15
+
16
+ *Graham Rogers*
17
+
18
+ * Add documentation about working with `turbo-rails`.
19
+
20
+ *Matheus Poli Camilo*
21
+
22
+ * Fix issue causing helper methods to not be available in nested components when the render monkey patch is disabled and `render_component` is used.
23
+
24
+ *Daniel Scheffknecht*
25
+
12
26
  ## 2.62.0
13
27
 
14
28
  * Remove the experimental global output buffer feature.
@@ -25,6 +39,10 @@ title: Changelog
25
39
 
26
40
  *Josh Clayton*
27
41
 
42
+ * Add predicate method support to polymorphic slots.
43
+
44
+ *Graham Rogers*
45
+
28
46
  ## 2.61.1
29
47
 
30
48
  * Revert `Expose Capybara DSL methods directly inside tests.` This change unintentionally broke other Capybara methods and thus introduced a regression. We aren't confident that we can fail forward so we have decided to revert this change.
@@ -42,6 +42,10 @@ module ViewComponent
42
42
  define_method(getter_name) do
43
43
  get_slot(slot_name)
44
44
  end
45
+
46
+ define_method("#{getter_name}?") do
47
+ get_slot(slot_name).present?
48
+ end
45
49
  end
46
50
 
47
51
  renderable_hash = types.each_with_object({}) do |(poly_type, poly_callable), memo|
@@ -3,6 +3,7 @@
3
3
  module ViewComponent
4
4
  module RenderComponentHelper # :nodoc:
5
5
  def render_component(component, &block)
6
+ component.set_original_view_context(__vc_original_view_context) if is_a?(ViewComponent::Base)
6
7
  component.render_in(self, &block)
7
8
  end
8
9
  end
@@ -98,11 +98,11 @@ module ViewComponent
98
98
  #
99
99
  # = Example
100
100
  #
101
- # render_many :items, -> (name:) { ItemComponent.new(name: name }
101
+ # renders_many :items, -> (name:) { ItemComponent.new(name: name }
102
102
  #
103
103
  # # OR
104
104
  #
105
- # render_many :items, ItemComponent
105
+ # renders_many :items, ItemComponent
106
106
  #
107
107
  # = Rendering sub-components
108
108
  #
@@ -3,7 +3,7 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
- MINOR = 62
6
+ MINOR = 63
7
7
  PATCH = 0
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.62.0
4
+ version: 2.63.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-25 00:00:00.000000000 Z
11
+ date: 2022-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport