Class: AuthController

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

Overview

認証

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /auth/index



8
9
10
# File 'app/controllers/auth_controller.rb', line 8

def index
  # nop
end

#logged_inObject

GET /auth/logged_in



13
14
15
16
# File 'app/controllers/auth_controller.rb', line 13

def logged_in
  @return_path = params[:return_path]
  @return_path = root_path if @return_path.blank?
end

#logged_outObject

GET /auth/logged_out



25
26
27
28
# File 'app/controllers/auth_controller.rb', line 25

def logged_out
  @return_path = params[:return_path]
  @return_path = root_path if @return_path.blank?
end

#logoutObject

POST /auth/logout



19
20
21
22
# File 'app/controllers/auth_controller.rb', line 19

def logout
  reset_session
  redirect_to(:action => "logged_out")
end