Rails::BrowserDetector
Identification of outdated browsers.
Installation
Add this line to your application's Gemfile:
gem 'rails-browser_detector'
Add congig/initializers/rails-browser_detector.rb
and include BrowserCompatible into needed controllers:
::ApplicationController.send :include, ::Rails::BrowserDetector::BrowserCompatible
Rails.application.config.compatible_browsers = {
'Chrome' => 45,
'Yandex Browser' => 13,
'Opera' => 32,
'Firefox' => 42,
'IE' => 10,
'Safari' => 8
}
Usage
Use controller/helper methods:
browser_old? #=> true
Contributing
- Fork it ( https://github.com/abak-press/rails-browser_detector/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request