Module: Headmin::BootstrapHelper

Included in:
AdminHelper
Defined in:
app/helpers/headmin/bootstrap_helper.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap_icon(icon, options = {}) ⇒ Object



3
4
5
6
7
# File 'app/helpers/headmin/bootstrap_helper.rb', line 3

def bootstrap_icon(icon, options = {})
  tag_name = options.extract!(:tag_name).fetch(:tag_name, :i)
  options[:class] = ["bi", "bi-#{icon}", options.dig(:class)].compact.join(" ")
  (tag_name, options) {}
end