Class: SessionsController

Inherits:
ActionController::Base
  • Object
show all
Includes:
ShopifyApp::SessionsConcern
Defined in:
app/controllers/sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#failureObject



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

def failure
  flash[:notice] = 'There was an issue while trying to authenticate, please retry'
  redirect_to root_path
end

#referralObject



5
6
7
8
9
# File 'app/controllers/sessions_controller.rb', line 5

def referral
  cookies[DiscoApp::SOURCE_COOKIE_KEY] = params[:source] if params[:source].present?
  cookies[DiscoApp::CODE_COOKIE_KEY] = params[:code] if params[:code].present?
  redirect_to root_path
end