diff --git a/app/helpers/react_component_helper.rb b/app/helpers/react_component_helper.rb index 821a6f1e2d4..4ce6732bc00 100644 --- a/app/helpers/react_component_helper.rb +++ b/app/helpers/react_component_helper.rb @@ -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) diff --git a/spec/helpers/react_component_helper_spec.rb b/spec/helpers/react_component_helper_spec.rb index 202694fbe4d..a9dc9c9bce5 100644 --- a/spec/helpers/react_component_helper_spec.rb +++ b/spec/helpers/react_component_helper_spec.rb @@ -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