Skip to content

Commit

Permalink
Be more generic and handle any tag that doesn't accept 'content' corr…
Browse files Browse the repository at this point in the history
…ectly.
  • Loading branch information
rjacoby committed Jan 30, 2025
1 parent 26d0918 commit d534e71
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ def call
**@attributes
}

if @tag == :input
if tag.method(@tag).parameters.any? { |type, name| name == :content }
tag.public_send(
@tag,
content,
**options)
else
tag.public_send(
@tag,
content,
**options)
end
end
Expand Down

0 comments on commit d534e71

Please sign in to comment.