mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Convert all session controllers directly under devise controller
This commit is contained in:
parent
db4727b8f7
commit
c08dc9aae7
5 changed files with 15 additions and 20 deletions
|
@ -1,14 +1,17 @@
|
|||
class Admin::SessionsController < SessionsController
|
||||
class Admin::SessionsController < Devise::SessionsController
|
||||
skip_authorization_check only: :create
|
||||
layout 'admin/application'
|
||||
|
||||
def create
|
||||
super
|
||||
end
|
||||
|
||||
def login
|
||||
end
|
||||
|
||||
def find_user_by_idc(idc)
|
||||
AdminUser.find_by(identity_code: idc)
|
||||
end
|
||||
# def create
|
||||
# @user = AdminUser.first if params[:user1]
|
||||
# @user = AdminUser.second if params[:user2]
|
||||
|
||||
# return redirect_to :back, alert: 'No user' if @user.blank?
|
||||
|
||||
# flash[:notice] = I18n.t('welcome')
|
||||
# sign_in_and_redirect @user, event: :authentication
|
||||
# end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue