Class: ApplicationController

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

Direct Known Subclasses

DashboardController

Instance Method Summary collapse

Instance Method Details

#doorkeeper_access_tokenObject



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

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

#doorkeeper_oauth_clientObject



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

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

#new_session_path(*args) ⇒ Object



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

def new_session_path *args 
  new_user_session_path *args
end