Remove unused `fa_icon` helper method (#31511)

pull/2818/head
Matt Jankowski 2024-08-20 11:59:59 -04:00 committed by GitHub
parent 4c4bcad866
commit f91403ccaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 14 deletions

View File

@ -105,14 +105,6 @@ module ApplicationHelper
policy(record).public_send(:"#{action}?")
end
def fa_icon(icon, attributes = {})
class_names = attributes[:class]&.split || []
class_names << 'fa'
class_names += icon.split.map { |cl| "fa-#{cl}" }
content_tag(:i, nil, attributes.merge(class: class_names.join(' ')))
end
def material_symbol(icon, attributes = {})
inline_svg_tag(
"400-24px/#{icon}.svg",

View File

@ -53,12 +53,6 @@ describe ApplicationHelper do
end
end
describe 'fa_icon' do
it 'returns a tag of fixed-width cog' do
expect(helper.fa_icon('cog fw')).to eq '<i class="fa fa-cog fa-fw"></i>'
end
end
describe '#material_symbol' do
it 'returns an svg with the icon and options' do
expect(helper.material_symbol('lock', class: :test, data: { hidden: true }))