Files

Class/Module Index [+]

Quicksearch

Devise::OmniAuth::UrlHelpers

Public Class Methods

define_helpers(mapping) click to toggle source
# File lib/devise/omniauth/url_helpers.rb, line 4
def self.define_helpers(mapping)
  return unless mapping.omniauthable?

  class_eval           def #{mapping.name}_omniauth_authorize_path(provider, params = {})            if Devise.omniauth_configs[provider.to_sym]              script_name = request.env["SCRIPT_NAME"]              path = "\#{script_name}/#{mapping.path}/auth/\#{provider}\".squeeze("/")              path << '?' + params.to_param if params.present?              path            else              raise ArgumentError, "Could not find omniauth provider \#{provider.inspect}"            end          end, __FILE__, __LINE__ + 1
end

Public Instance Methods

omniauth_authorize_path(resource_or_scope, *args) click to toggle source
# File lib/devise/omniauth/url_helpers.rb, line 22
def omniauth_authorize_path(resource_or_scope, *args)
  scope = Devise::Mapping.find_scope!(resource_or_scope)
  send("#{scope}_omniauth_authorize_path", *args)
end
omniauth_callback_path(resource_or_scope, *args) click to toggle source
# File lib/devise/omniauth/url_helpers.rb, line 27
def omniauth_callback_path(resource_or_scope, *args)
  scope = Devise::Mapping.find_scope!(resource_or_scope)
  send("#{scope}_omniauth_callback_path", *args)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.