Class: SessionsController

Inherits:
ShopifyApp::SessionsController
  • Object
show all
Defined in:
app/controllers/sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#failureObject



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

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

#referralObject



3
4
5
6
7
# File 'app/controllers/sessions_controller.rb', line 3

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