jaredonline/google-authenticator — pull request #19 by itspriddle (2014-05-09 15:46:12+00:00)
Title: Extend ActionController with ActiveSupport.on_load

I'm using this gem in a library that depends on ActionPack but doesn't require it upfront. The Rails adapter assumes that ActionController is loaded already, so I was an seeing uninitialized constant error.

```
uninitialized constant ActionController
/Users/priddle/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/google-authenticator-rails-0.0.10/lib/google-authenticator-rails/action_controller/rails_adapter.rb:36:in `'
/Users/priddle/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/google-authenticator-rails-0.0.10/lib/google-authenticator-rails/action_controller.rb:1:in `'
/Users/priddle/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/google-authenticator-rails-0.0.10/lib/google-authenticator-rails.rb:20:in `block in '
/Users/priddle/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/google-authenticator-rails-0.0.10/lib/google-authenticator-rails.rb:19:in `each'
/Users/priddle/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/google-authenticator-rails-0.0.10/lib/google-authenticator-rails.rb:19:in `'
```

This PR tweaks the Rails adapter to use `ActiveSupport.on_load :action_controller` instead. The block is only executed when ActionController is actually loaded.