plataformatec/devise — pull request #3168 by mhodgson (2014-08-23 03:55:33+00:00)
Title: Update for compatibility with changes to router scopes in Rails 4.2

I'm not sure if there is a cleaner or more standard way to implement forked logic for different rails versions, but this does work fine with the Rails 4.2 beta.