mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 01:41:08 +00:00
Remove deprecated content_tag
from react component helper
This commit is contained in:
parent
c1542643f5
commit
0088bb5991
|
@ -6,7 +6,7 @@ module ReactComponentHelper
|
||||||
if block.nil?
|
if block.nil?
|
||||||
div_tag_with_data(data)
|
div_tag_with_data(data)
|
||||||
else
|
else
|
||||||
content_tag(:div, data: data, &block)
|
tag.div(data: data, &block)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ module ReactComponentHelper
|
||||||
private
|
private
|
||||||
|
|
||||||
def div_tag_with_data(data)
|
def div_tag_with_data(data)
|
||||||
content_tag(:div, nil, data: data)
|
tag.div(data: data)
|
||||||
end
|
end
|
||||||
|
|
||||||
def serialized_attachment(attachment)
|
def serialized_attachment(attachment)
|
||||||
|
|
|
@ -16,7 +16,7 @@ RSpec.describe ReactComponentHelper do
|
||||||
context 'with a block passed in' do
|
context 'with a block passed in' do
|
||||||
let(:result) do
|
let(:result) do
|
||||||
helper.react_component('name', { one: :two }) do
|
helper.react_component('name', { one: :two }) do
|
||||||
helper.content_tag(:nav, 'ok')
|
helper.tag.nav('ok')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user