diff --git a/lib/devise/omniauth/url_helpers.rb b/lib/devise/omniauth/url_helpers.rb index d7b3a36eae..dd123f6a9b 100644 --- a/lib/devise/omniauth/url_helpers.rb +++ b/lib/devise/omniauth/url_helpers.rb @@ -6,12 +6,12 @@ def self.define_helpers(mapping) def omniauth_authorize_path(resource_or_scope, *args) scope = Devise::Mapping.find_scope!(resource_or_scope) - send("#{scope}_omniauth_authorize_path", *args) + _devise_route_context.send("#{scope}_omniauth_authorize_path", *args) end def omniauth_callback_path(resource_or_scope, *args) scope = Devise::Mapping.find_scope!(resource_or_scope) - send("#{scope}_omniauth_callback_path", *args) + _devise_route_context.send("#{scope}_omniauth_callback_path", *args) end end end