Many default Rails helpers allow to provide the HTML classes as either an Array or a String f.e.
link_to("something", some_path, class: ["class_a", "class_b", "class_c"]
However, the helper method "icon" requires a String. Otherwise, the given Array is turned into a String using the to_s method, which is counterintuitive to how the rest of the helpers work.
Line 9 in /lib/font_awesome/sass/rails/helpers.rb:
content_class << " #{html_options[:class]}" if html_options.key?(:class)
A simple fix would be the following:
content_class << " #{Array(html_options[:class]).join(" ")}" if html_options.key?(:class)
Is something like that possible for the next release?
Many default Rails helpers allow to provide the HTML classes as either an Array or a String f.e.
link_to("something", some_path, class: ["class_a", "class_b", "class_c"]
However, the helper method "icon" requires a String. Otherwise, the given Array is turned into a String using theto_s
method, which is counterintuitive to how the rest of the helpers work.Line 9 in /lib/font_awesome/sass/rails/helpers.rb:
content_class << " #{html_options[:class]}" if html_options.key?(:class)
A simple fix would be the following:
content_class << " #{Array(html_options[:class]).join(" ")}" if html_options.key?(:class)
Is something like that possible for the next release?