Class: Hello::Authentication::SessionsController
- Inherits:
-
Hello::ApplicationController
- Object
- ApplicationController
- Hello::ApplicationController
- Hello::Authentication::SessionsController
- Defined in:
- app/controllers/hello/authentication/sessions_controller.rb
Instance Method Summary collapse
-
#destroy ⇒ Object
DELETE /hello/sessions/1.
-
#index ⇒ Object
GET /hello/sessions.
-
#new ⇒ Object
GET /hello/sessions/new.
-
#show ⇒ Object
GET /hello/sessions/1.
-
#sign_out ⇒ Object
get /hello/sign_out.
Instance Method Details
#destroy ⇒ Object
DELETE /hello/sessions/1
34 35 36 37 38 39 40 41 42 43 |
# File 'app/controllers/hello/authentication/sessions_controller.rb', line 34 def destroy sign_out!(@access) business = Hello::Business::Authentication::SignOut.new respond_to do |format| format.html { redirect_to hello.sessions_path, notice: business. } format.json { head :reset_content } end end |
#index ⇒ Object
GET /hello/sessions
12 13 14 |
# File 'app/controllers/hello/authentication/sessions_controller.rb', line 12 def index render_list end |
#new ⇒ Object
GET /hello/sessions/new
17 18 19 |
# File 'app/controllers/hello/authentication/sessions_controller.rb', line 17 def new render_new end |
#show ⇒ Object
GET /hello/sessions/1
22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/hello/authentication/sessions_controller.rb', line 22 def show self.session_token = @access.token business = Hello::Business::Authentication::SignIn.new respond_to do |format| format.html { redirect_to hello.sessions_path, notice: business. } format.json { head :reset_content } end end |
#sign_out ⇒ Object
get /hello/sign_out
46 47 48 49 50 51 52 53 54 55 |
# File 'app/controllers/hello/authentication/sessions_controller.rb', line 46 def sign_out sign_out! business = Hello::Business::Authentication::SignOut.new respond_to do |format| format.html { redirect_to '/', notice: business. } format.json { head :reset_content } end end |