Skip to content

Commit 10a8be5

Browse files
committed
Handle kwargs in unbuffered calls
1 parent 512cc2d commit 10a8be5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/phlex/rails/unbuffered.rb

+3-6
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,19 @@ def respond_to_missing?(...)
1010
@component.respond_to?(...)
1111
end
1212

13-
def method_missing(method_name, *, &erb)
13+
def method_missing(method_name, *, **, &erb)
1414
if @component.respond_to?(method_name)
1515
output = @component.capture do
1616
if erb
17-
@component.public_send(method_name, *) do
17+
@component.public_send(method_name, *, **) do
1818
@component.raw(
1919
@component.helpers.capture(
2020
&erb
2121
),
2222
)
2323
end
2424
else # no erb block
25-
@component.public_send(
26-
method_name,
27-
*,
28-
)
25+
@component.public_send(method_name, *, **)
2926
end
3027
end
3128
else

0 commit comments

Comments
 (0)