Posted By

winson on 04/30/07


Tagged

login textmate controller


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

webstic
octoberborn


Basic login


 / Published in: Rails
 

  1. def login
  2. if request.post?
  3. begin
  4. session[:user] = User.authenticate(params[:employee][:email], params[:employee][:password]).id
  5. redirect_to :controller => 'tickets', :action => 'list_open'
  6. rescue AuthenticationError => e
  7. flash[:warning] = "#{e}"
  8. end
  9. end
  10. end

Report this snippet  

You need to login to post a comment.