fnando/browser — pull request #100 by Salzig (2014-08-12 09:51:46+00:00)
Title: Browser outdated

This pull request allows you to detect outdated browsers via pre-/self-defined rules. A rule must be a proc/lambda or any object that implements the call method and accepts the browser object as parameter. To redefine all rules, clear the existing rules before adding your own.

Define all IE as outdated:
```ruby
# Consider all IE as outdated.
Browser.modern_rules << -> b { b.ie? }
```

and redirect all outdated browser to the upgrade page.
```ruby
use Browser::Middleware do
redirect_to "/upgrade" if browser.outdated?
end
```