Class: AccountController

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

Instance Method Summary collapse

Methods included from ApplicationHelper

#footer_menu, #home_page

Instance Method Details

#loginObject



18
19
# File 'app/controllers/account_controller.rb', line 18

def 
end

#login_postObject



8
9
10
11
12
13
14
15
16
# File 'app/controllers/account_controller.rb', line 8

def 
  if authenticate(params[:login], params[:password])
    flash[:notice] = "Logged in successfully"
    redirect_back_or_default(home_page())
  else
    flash[:notice] = "Login failed."
    redirect_to(:action => :login)
  end
end

#logoutObject



32
33
34
35
36
# File 'app/controllers/account_controller.rb', line 32

def logout
  user_logout()
  flash[:notice] = "You have been logged out."
  redirect_back_or_default(home_page())
end

#page_titleObject



38
39
40
# File 'app/controllers/account_controller.rb', line 38

def page_title
	'Welcome !'
end

#signupObject



29
30
# File 'app/controllers/account_controller.rb', line 29

def 
end

#signup_postObject



21
22
23
24
25
26
27
# File 'app/controllers/account_controller.rb', line 21

def 
  user_signup!(params[:user])
  redirect_back_or_default(home_page())
  flash[:notice] = "Thanks for signing up!"
rescue ActiveRecord::RecordInvalid
  redirect_to(:action => :signup)
end