You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: