Remove deprecated content_tag from react component helper

This commit is contained in:
Matt Jankowski 2025-09-03 08:54:34 -04:00
parent c1542643f5
commit 0088bb5991
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ module ReactComponentHelper
if block.nil?
div_tag_with_data(data)
else
content_tag(:div, data: data, &block)
tag.div(data: data, &block)
end
end
@ -22,7 +22,7 @@ module ReactComponentHelper
private
def div_tag_with_data(data)
content_tag(:div, nil, data: data)
tag.div(data: data)
end
def serialized_attachment(attachment)

View File

@ -16,7 +16,7 @@ RSpec.describe ReactComponentHelper do
context 'with a block passed in' do
let(:result) do
helper.react_component('name', { one: :two }) do
helper.content_tag(:nav, 'ok')
helper.tag.nav('ok')
end
end