plataformatec/devise — pull request #3153 by lucasmazza (2014-08-17 22:58:25+00:00)
Title: Bring back rails master

This Pull Request aims to bring back compatibility with Rails 4.2/master since rails/rails@dc3f25c8a5aa64de9225f11498a389a2d31e880a has changed the `@scope` data structure from the router, without losing compatibility with existing versions of Rails where this object is a `Hash`.

In the matter of Rails 4.2, we also have this deprecation warning:

```
DEPRECATION WARNING: defining a route where `to` is a controller without an action is deprecated. Please change "to: :users/omniauth_callbacks" to "controller: :users/omniauth_callbacks". (called from devise_omniauth_callback at /Users/lucas/code/ptec/devise/lib/devise/rails/routes.rb:436)
```

Changing the router code to use `controllers[:omniauth_callbacks]` leads to the following error:

```
/opt/rubies/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/rails-d5be08347fb7/actionpack/lib/action_dispatch/routing/mapper.rb:263:in `block (2 levels) in check_controller_and_action': 'users/auth/:action' is not a supported controller name. This can lead to potential routing problems. See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use (ArgumentError)
```