Simple Authentication Checker

/ Published in: Ruby
Save to your folder(s)

Copy this code and paste it in your HTML
  1. def check_authentication
  2. unless session[:admin]
  3. session[:intended_action] = action_name
  4. session[:intended_controller] = controller_name
  5. redirect_to :action => "signin"
  6. end
  7. end

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.