Remove unused fa_icon
helper method (#31511)
This commit is contained in:
parent
4c4bcad866
commit
f91403ccaa
2 changed files with 0 additions and 14 deletions
|
@ -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",
|
||||
|
|
|
@ -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 }))
|
||||
|
|
Loading…
Reference in a new issue