Home

Awesome

OutdatedbrowserRails

This project bundles the excellent Burocratik's Outdated Browser detector for use with the rails 4+ asset pipeline.

Gem Version

About

The version numbers of this gem follow the versioning of Outdated Browser, and the gem follows the feature/languages gem, which includes translations for several languages. The gem uses I18n.locale to select the correct locale, and falls back to en if the selected locale does not exist.

Installation

Add this line to your application's Gemfile:

gem 'outdatedbrowser_rails'

Usage

1. Include Outdated Browser assets

Add this line to your application.js:

//= require outdatedbrowser/outdatedBrowser

Add this line to your application.css || application.scss:

//= require outdatedbrowser/outdatedBrowser

2. Require Outdated Browser

In the view where you want to use this, add:

<%= render 'outdatedbrowser/outdatedbrowser' %>

At the bottom of the body (make sure it's included after application.js), add:

<%= javascript_include_tag 'outdatedbrowser/require_outdatedbrowser' %>

Testing the integration in your app

Contributing

Feel free to open an issue if you find something that could be improved.

Here are a couple of things worth noting:

Finally, to contribute:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Run tests using rspec spec, and make sure they are green!
  4. Add tests to spec/features, if necessary.
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request