Class: Peoplefinder::SessionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/peoplefinder/sessions_controller.rb

Instance Method Summary collapse

Methods included from FeatureHelper

#feature_disabled?, #feature_enabled?

Instance Method Details

#createObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/peoplefinder/sessions_controller.rb', line 5

def create
  person = Person.from_auth_hash(auth_hash)
  if person
    session['current_user_id'] = person.id
    redirect_to_desired_path
  else
    render :failed
  end
end

#destroyObject



18
19
20
21
# File 'app/controllers/peoplefinder/sessions_controller.rb', line 18

def destroy
  session['current_user_id'] = nil
  redirect_to '/'
end

#newObject



15
16
# File 'app/controllers/peoplefinder/sessions_controller.rb', line 15

def new
end