Fixed issue with FA icon in ApplicationHelper
• Fixed: - issue with FA icon in ApplicationHelper
This commit is contained in:
parent
90b752c91d
commit
6354007875
@ -49,10 +49,10 @@ module ApplicationHelper
|
|||||||
policy(record).public_send("#{action}?")
|
policy(record).public_send("#{action}?")
|
||||||
end
|
end
|
||||||
|
|
||||||
def fa_icon(icon, attributes = {})
|
def fa_icon(icon="", attributes = {})
|
||||||
class_names = attributes[:class]&.split(' ') || []
|
class_names = attributes[:class]&.split(' ') || []
|
||||||
class_names << 'fa'
|
class_names << 'fa'
|
||||||
# class_names += icon.split(' ').map { |cl| "fa-#{cl}" }
|
class_names += "#{icon}".split(' ').map { |cl| "fa-#{cl}" }
|
||||||
|
|
||||||
content_tag(:i, nil, attributes.merge(class: class_names.join(' ')))
|
content_tag(:i, nil, attributes.merge(class: class_names.join(' ')))
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user