README.md in flag-icons-rails-1.1.1 vs README.md in flag-icons-rails-1.1.2

- old
+ new

@@ -1,62 +1,74 @@ -FlagIconsRails +flag-icons-rails [![Gem Version](http://img.shields.io/gem/v/flag-icons-rails.svg)](https://rubygems.org/gems/flag-icons-rails) [![Gem Downloads](http://ruby-gem-downloads-badge.herokuapp.com/flag-icons-rails)](https://rubygems.org/gems/flag-icons-rails) [![Code Climate](https://codeclimate.com/github/eugenegarl/flag-icons-rails/badges/gpa.svg)](https://codeclimate.com/github/eugenegarl/flag-icons-rails) --- +**flag-icons-rails** provides [flag-icon-css](https://github.com/lipis/flag-icon-css) - a collection of all country flags in SVG - as a Ruby gem for use with the asset pipeline. -This project integrates [https://github.com/lipis/flag-icon-css](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: +Add this to your Gemfile: ```ruby gem 'flag-icons-rails' ``` -And then execute: +and then execute: ```sh bundle install ``` -Import the FlagIconsRails styles in your `app/assets/stylesheets/application.scss`. +Do not add gem to `assets` section if you want to use [ `flag_icon` rails helper](#rails-helper-usage). +### Usage + +In your `application.css`, include the file: + +```css +/* + *= require flag-icon + */ +``` + +If you prefer [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your +`application.scss` file: + ```scss @import "flag-icon"; ``` -#### Plain usage +Then restart your webserver if it was previously running. +### Plain usage + In your view: ```html -<span class="flag-icon flag-icon-it"></span> +<span class="flag-icon flag-icon-by"></span> ``` ```html -<span class="flag-icon flag-icon-it flag-icon-squared"></span> +<span class="flag-icon flag-icon-by flag-icon-squared"></span> ``` -#### Rails Helper usage +### Rails Helper usage In your view: ```ruby -flag_icon(:it) -# => <span class="flag-icon flag-icon-it"></span> +flag_icon(:by) +# => <span class="flag-icon flag-icon-by"></span> ``` ```ruby -flag_icon(:it, true) -# => <span class="flag-icon flag-icon-it flag-icon-squared"></span> +flag_icon(:by, true) +# => <span class="flag-icon flag-icon-by flag-icon-squared"></span> ``` ```ruby -flag_icon(:it, id: 'my-flag', class: 'strong') -# => <span id="my-flag" class="flag-icon flag-icon-it flag-icon-squared strong"></span> +flag_icon(:by, id: 'my-flag', class: 'strong') +# => <span id="my-flag" class="flag-icon flag-icon-by flag-icon-squared strong"></span> ``` ### Thanks -* [lipis/flag-icon-css](https://github.com/lipis/flag-icon-css) for flags-icon-css -* [flag-icon-sass gem](https://github.com/cfiorini/flag-icon-sass) for gem this one is based on +* **lipis** for amazing collection of all country flags [flags-icon-css](https://github.com/lipis/flag-icon-css) +* **cfiorini** for [flag-icon-sass](https://github.com/cfiorini/flag-icon-sass) gem this one is based on