Commit 114c465110d14ea44e4c24a71e78c22484e77fb5

Authored by AntonioTerceiro
1 parent d5678672

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,6 +7,7 @@ class AccountController < ApplicationController
7 end 7 end
8 end 8 end
9 9
  10 + # action to perform login to the application
10 def login 11 def login
11 return unless request.post? 12 return unless request.post?
12 self.current_user = User.authenticate(params[:login], params[:password]) 13 self.current_user = User.authenticate(params[:login], params[:password])
@@ -22,6 +23,7 @@ class AccountController < ApplicationController @@ -22,6 +23,7 @@ class AccountController < ApplicationController
22 end 23 end
23 end 24 end
24 25
  26 + # action to register an user to the application
25 def signup 27 def signup
26 begin 28 begin
27 @user = User.new(params[:user]) 29 @user = User.new(params[:user])
@@ -35,6 +37,7 @@ class AccountController < ApplicationController @@ -35,6 +37,7 @@ class AccountController < ApplicationController
35 end 37 end
36 end 38 end
37 39
  40 + # action to perform logout from the application
38 def logout 41 def logout
39 self.current_user.forget_me if logged_in? 42 self.current_user.forget_me if logged_in?
40 cookies.delete :auth_token 43 cookies.delete :auth_token