Class: ShopQiApp::SessionsController
Instance Method Summary
collapse
#authenticate_shop!, #current_shop, #shop_url, #signed_in?
Instance Method Details
#destroy ⇒ Object
19
20
21
22
|
# File 'app/controllers/shopqi_app/sessions_controller.rb', line 19
def destroy
cookies.delete(:shop_id)
redirect_to main_app.root_path
end
|
#new ⇒ Object
5
6
7
8
9
|
# File 'app/controllers/shopqi_app/sessions_controller.rb', line 5
def new
if params[:shop].present?
redirect_to "/auth/shopqi?shop=#{params[:shop].to_s.strip}"
end
end
|
#shopqi_login ⇒ Object
11
12
13
14
15
16
17
|
# File 'app/controllers/shopqi_app/sessions_controller.rb', line 11
def shopqi_login
if signed_in?
redirect_to main_app.root_path
else
redirect_to main_app.login_path(shop: params[:shop])
end
end
|