inline_partial 0.1.0 → 0.1.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 +4 -1
- data/lib/inline_partial/helper.rb +2 -2
- data/lib/inline_partial/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76ca0f8544f2dcfe9a820c1281ae48b59dc90a9e590044e351a6283f07d40cec
|
4
|
+
data.tar.gz: be86fe0ba7bac748344990dcacdc7dc774f5e1c5d70b80d4e2cab46112cd262c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08c47f45d944c7caeb6af274158654fb1b7680bdba20a2cd8a999c1db06518b791aeb5a26e85d20e3d59ce0f34ff5509b5b849910c48a020a99f7af209dd8a33'
|
7
|
+
data.tar.gz: 58e8dcd6364a17eb1c66affb3b83381cd774ee68ec9f8c886d0e04c8176f1a01329c33e8e4960960f32cc5aa466fa228384be587636c7fa88f05c332c653fd7c
|
data/CHANGELOG.md
CHANGED
@@ -10,7 +10,7 @@ module InlinePartial
|
|
10
10
|
nil
|
11
11
|
end
|
12
12
|
|
13
|
-
def render_inline_partial(name,
|
13
|
+
def render_inline_partial(name, object = nil, collection: nil)
|
14
14
|
raise ArgumentError, "partial name must be present (not nil)" if name.nil?
|
15
15
|
|
16
16
|
if collection
|
@@ -21,7 +21,7 @@ module InlinePartial
|
|
21
21
|
partial = @_inline_partials&.[](name)
|
22
22
|
raise ArgumentError, "inline partial :#{name.inspect} not found" unless partial
|
23
23
|
|
24
|
-
capture(
|
24
|
+
capture(object, &partial)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|