Posted By

winson on 04/30/07


Tagged

textmate controller application


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


Current user


 / Published in: Rails
 

  1. protected
  2. def current_engineer
  3. Engineer.find(session[:user])
  4. end
  5.  
  6. def current_user
  7. Employee.find(session[:user])
  8. end
  9.  
  10. def check_user_authentication
  11. unless session[:user]
  12. redirect_to :controller => 'account', :action => 'login'
  13. end
  14. end

Report this snippet  

You need to login to post a comment.