Class: ThinkFeelDoEngine::QuickSignInsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/think_feel_do_engine/quick_sign_ins_controller.rb

Overview

Used ONLY in development to speed up manual logins.

Constant Summary

Constants inherited from ApplicationController

ApplicationController::CSRF_COOKIE_NAME, ApplicationController::CSRF_HEADER_NAME, ApplicationController::INACTIVE_MESSAGE, ApplicationController::ROOT_URI

Instance Method Summary collapse

Methods inherited from ApplicationController

#access_denied_resource_path, #after_sign_in_path_for, #after_sign_out_path_for, #raise_not_found!, #render_not_found

Instance Method Details

#newObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/think_feel_do_engine/quick_sign_ins_controller.rb', line 9

def new
  if params[:user_id]
    resource = User.where(id: params[:user_id]).first
  elsif params[:participant_id]
    ParticipantLoginEvent.create(participant_id: params[:participant_id])
    resource = Participant.where(id: params[:participant_id]).first
  end

  return unless resource

   resource
end