plataformatec/devise — Issue #1514: user_omniauth_callback  + scope problem
Author: dbarison
Created: 2011-12-20 15:18:31+00:00
State: open

i have following scope in my routes for locale.

scope '/:locale', :locale => /#{I18n.available_locales.join('|')}/ do
devise_for :users, :controllers => { :omniauth_callbacks => 'users/omniauth_callbacks' }
end

every devise url is ok, for example
new_user_session GET (/:locale)/users/sign_in(.:format) {:locale=>/en|it/, :action=>"new", :controller=>"devise/sessions"}

user_omniauth_callback generates wrong url, for example
user_omniauth_callback /users/auth/:action/callback(.:format) {:action=>/facebook/, :locale=>/en|it/, :controller=>"users/omniauth_callbacks"}

I have in application controller

def default_url_options(options={})
{ :locale => I18n.locale }
end

i'm using devise 1.5.3 and omniauth 1.0.1
i can't explain this behaviour. Any idea or help?