From 6354007875e2f5b9f93aba6735d2e5552fe28e41 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Tue, 19 Jan 2021 00:35:51 -0500 Subject: [PATCH] Fixed issue with FA icon in ApplicationHelper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed: - issue with FA icon in ApplicationHelper --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ca04d913..8f901b5c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -49,10 +49,10 @@ module ApplicationHelper policy(record).public_send("#{action}?") end - def fa_icon(icon, attributes = {}) + def fa_icon(icon="", attributes = {}) class_names = attributes[:class]&.split(' ') || [] 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(' '))) end