Module: FlagIconSass::Rails::ViewHelpers
- Defined in:
- lib/flag-icon-sass/rails/helpers.rb
Instance Method Summary collapse
Instance Method Details
#flag_icon(cca2, squared = false, html_options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/flag-icon-sass/rails/helpers.rb', line 4 def flag_icon(cca2, squared = false, = {}) squared, = false, squared if squared.is_a?(Hash) content_class = "flag-icon flag-icon-#{cca2}" content_class << " flag-icon-squared" if squared content_class << " #{[:class]}" if .key?(:class) [:class] = content_class content_tag(:span, nil, ) end |