Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#doorkeeper_access_tokenObject



9
10
11
# File 'app/controllers/application_controller.rb', line 9

def doorkeeper_access_token
  @token ||= OAuth2::AccessToken.new(doorkeeper_oauth_client, current_user.doorkeeper_access_token) if current_user
end

#doorkeeper_oauth_clientObject



5
6
7
# File 'app/controllers/application_controller.rb', line 5

def doorkeeper_oauth_client
  @client ||= OAuth2::Client.new(DOORKEEPER_APP_ID, DOORKEEPER_APP_SECRET, :site => DOORKEEPER_APP_URL)
end

#new_session_path(*args) ⇒ Object



13
14
15
# File 'app/controllers/application_controller.rb', line 13

def new_session_path *args 
  new_user_session_path *args
end