Module: ShopQiApp::Rails::Routes::Helper

Defined in:
lib/shopqi_app/rails/routes.rb

Instance Method Summary collapse

Instance Method Details

#use_shopqi(options = {}, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/shopqi_app/rails/routes.rb', line 5

def use_shopqi(options = {}, &block)
  options.reverse_merge! callbacks: 'shopqi_app/omniauth_callbacks'
  self.match 'login' => "shopqi_app/sessions#new"
  self.get 'callback_login' => "shopqi_app/sessions#shopqi_login" # 从 ShopQi 后台管理点击应用直接登录
  self.get 'callback' => "#{options[:callbacks]}#shopqi"
  self.get 'sign_out' => "shopqi_app/sessions#destroy"
end