FlagIconSass

This project integrates https://github.com/lipis/flag-icon-css in a Ruby Gem but only the sass version.

THIS GEM IS IN EARLY BETA STATE SO USE AT YOUR OWN RISK

Installation

In your Gemfile include:

gem 'flag-icon-sass'

And then execute:

bundle install

Import the FlagIconSass styles in your app/assets/stylesheets/application.scss.

@import "flag-icon-sass";

Plain usage

In your view:

<span class="flag-icon flag-icon-it"></span>
<span class="flag-icon flag-icon-it flag-icon-squared"></span>

Rails Helper usage

In your view:

flag_icon(:it)
# => <span class="flag-icon flag-icon-it"></span>
flag_icon(:it, true)
# => <span class="flag-icon flag-icon-it flag-icon-squared"></span>
flag_icon(:it, id: 'my-flag', class: 'strong')
# => <span id="my-flag" class="flag-icon flag-icon-it flag-icon-squared strong"></span>

Thanks