Class: AnyLoginMultiple::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/any_login_multiple/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#any_login_multipleObject



3
4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/any_login_multiple/application_controller.rb', line 3

def 
  reset_session

  klass_string = params[:as]
  @user = klass_string.constantize.find(params[:id])

  # Call devise sign in method
   klass_string.parameterize.underscore.to_sym, @user

  redirect_to main_app.root_path
end