Class: Puffer::Sessions::Clearance
- 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
#create ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/puffer/backends/controllers/sessions/clearance.rb', line 17 def create if @record = authenticate and sign_in(@record) redirect_back_or admin_root_url else @record = resource.new_member :email => resource.attributes[:email] render 'new' end end |
#destroy ⇒ Object
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 |
#new ⇒ Object
13 14 15 |
# File 'lib/puffer/backends/controllers/sessions/clearance.rb', line 13 def new @record = resource.new_member end |