Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 24 lines (20 sloc) 0.675 kB
02e8c04 @josevalim Update views generator and now have scoped views.
josevalim authored
1 class Devise::SessionsController < ApplicationController
a5ba2ac @carlosantoniodasilva Use prepend_before_filter in require_no_authentication.
carlosantoniodasilva authored
2 prepend_before_filter :require_no_authentication, :only => [ :new, :create ]
b581f86 @josevalim DRY up controllers.
josevalim authored
3 include Devise::Controllers::InternalHelpers
dede8af @josevalim Do not include Devise internal helpers in application controller.
josevalim authored
4
b21b629 @carlosantoniodasilva Better documentation.
carlosantoniodasilva authored
5 # GET /resource/sign_in
7ce49cb @carlosantoniodasilva Configuring session and password controllers as engine, and getting i…
carlosantoniodasilva authored
6 def new
2b5a068 @josevalim Move part of the logic in SessionsController#create to the FailureApp…
josevalim authored
7 clean_up_passwords(build_resource)
8a15ac6 @josevalim Stub out other views for Registerable.
josevalim authored
8 render_with_scope :new
7ce49cb @carlosantoniodasilva Configuring session and password controllers as engine, and getting i…
carlosantoniodasilva authored
9 end
10
b21b629 @carlosantoniodasilva Better documentation.
carlosantoniodasilva authored
11 # POST /resource/sign_in
7ce49cb @carlosantoniodasilva Configuring session and password controllers as engine, and getting i…
carlosantoniodasilva authored
12 def create
2b5a068 @josevalim Move part of the logic in SessionsController#create to the FailureApp…
josevalim authored
13 resource = warden.authenticate!(:scope => resource_name, :recall => "new")
14 set_flash_message :notice, :signed_in
15 sign_in_and_redirect(resource_name, resource)
7ce49cb @carlosantoniodasilva Configuring session and password controllers as engine, and getting i…
carlosantoniodasilva authored
16 end
17
b21b629 @carlosantoniodasilva Better documentation.
carlosantoniodasilva authored
18 # GET /resource/sign_out
7ce49cb @carlosantoniodasilva Configuring session and password controllers as engine, and getting i…
carlosantoniodasilva authored
19 def destroy
6d80418 @carlosantoniodasilva Changing flash messages to new Rails defaults :notice/:alert
carlosantoniodasilva authored
20 set_flash_message :notice, :signed_out if signed_in?(resource_name)
819db39 @SSDany simplification (sign_out_everybody => sign_out_all_scopes)
SSDany authored
21 sign_out_and_redirect(resource_name)
7ce49cb @carlosantoniodasilva Configuring session and password controllers as engine, and getting i…
carlosantoniodasilva authored
22 end
23 end
Something went wrong with that request. Please try again.