Class: Puffer::Sessions::Clearance

Inherits:
Base
  • Object
show all
Defined in:
lib/puffer/backends/controllers/sessions/clearance.rb

Overview

Puffer::Sessions::Clearance integrates Puffer admin interface builder with the Clearance authentication & authorization solution.

Instance Method Summary collapse

Instance Method Details

#createObject



17
18
19
20
21
22
23
24
# File 'lib/puffer/backends/controllers/sessions/clearance.rb', line 17

def create
  if @record = authenticate and (@record)
    redirect_back_or admin_root_url
  else
    @record = resource.new_member :email => resource.attributes[:email]
    render 'new'
  end
end

#destroyObject



26
27
28
29
# File 'lib/puffer/backends/controllers/sessions/clearance.rb', line 26

def destroy
  sign_out
  redirect_to new_admin_session_url
end

#newObject



13
14
15
# File 'lib/puffer/backends/controllers/sessions/clearance.rb', line 13

def new
  @record = resource.new_member
end