Commit 114c465110d14ea44e4c24a71e78c22484e77fb5
1 parent
d5678672
Exists in
master
and in
22 other branches
ActionItem9: minor doc work
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@193 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
app/controllers/account_controller.rb
| ... | ... | @@ -7,6 +7,7 @@ class AccountController < ApplicationController |
| 7 | 7 | end |
| 8 | 8 | end |
| 9 | 9 | |
| 10 | + # action to perform login to the application | |
| 10 | 11 | def login |
| 11 | 12 | return unless request.post? |
| 12 | 13 | self.current_user = User.authenticate(params[:login], params[:password]) |
| ... | ... | @@ -22,6 +23,7 @@ class AccountController < ApplicationController |
| 22 | 23 | end |
| 23 | 24 | end |
| 24 | 25 | |
| 26 | + # action to register an user to the application | |
| 25 | 27 | def signup |
| 26 | 28 | begin |
| 27 | 29 | @user = User.new(params[:user]) |
| ... | ... | @@ -35,6 +37,7 @@ class AccountController < ApplicationController |
| 35 | 37 | end |
| 36 | 38 | end |
| 37 | 39 | |
| 40 | + # action to perform logout from the application | |
| 38 | 41 | def logout |
| 39 | 42 | self.current_user.forget_me if logged_in? |
| 40 | 43 | cookies.delete :auth_token | ... | ... |