view_component 2.11.0 → 2.11.1
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/CHANGELOG.md +6 -0
- data/lib/view_component/base.rb +2 -2
- data/lib/view_component/collection.rb +1 -1
- data/lib/view_component/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: c63a550faa0964130875d2670dd2d39753acd1ff2fc14ee88168573af6661619
|
|
4
|
+
data.tar.gz: 5f54192e46fc3cbde5e0a5f2f3b6c186790f9ad2fe91627f0662457d7434d679
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b786100a0867df76302b15c726e3dfe4dc2c60786ef34b269d9c7c8cd8fadabb695f3f83ad00a1872e1fdb5d5f112857ca32f2da998c459e2f576cbd9a163d46
|
|
7
|
+
data.tar.gz: 4e30cd32923a51d7a29f78fa86bc11d21bec5653b60961b444819b821897ebf7a00284e76557a18c6e61b2baa6c7d78bc72033f465d8d99d271a51e84bd63895
|
data/CHANGELOG.md
CHANGED
data/lib/view_component/base.rb
CHANGED
|
@@ -161,8 +161,8 @@ module ViewComponent
|
|
|
161
161
|
attr_accessor :source_location
|
|
162
162
|
|
|
163
163
|
# Render a component collection.
|
|
164
|
-
def with_collection(
|
|
165
|
-
Collection.new(self,
|
|
164
|
+
def with_collection(collection, **args)
|
|
165
|
+
Collection.new(self, collection, **args)
|
|
166
166
|
end
|
|
167
167
|
|
|
168
168
|
# Provide identifier for ActionView template annotations
|
|
@@ -9,7 +9,7 @@ module ViewComponent
|
|
|
9
9
|
@component.validate_collection_parameter!(validate_default: true)
|
|
10
10
|
|
|
11
11
|
@collection.map do |item|
|
|
12
|
-
content = @component.new(component_options(item, iterator)).render_in(view_context, &block)
|
|
12
|
+
content = @component.new(**component_options(item, iterator)).render_in(view_context, &block)
|
|
13
13
|
iterator.iterate!
|
|
14
14
|
content
|
|
15
15
|
end.join.html_safe
|
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.11.
|
|
4
|
+
version: 2.11.1
|
|
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: 2020-06-
|
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|