Advertisement
Guest User

Untitled

a guest
May 22nd, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.24 KB | None | 0 0
  1. class ApplicationController < ActionController::Base
  2.   protect_from_forgery
  3.   before_filter :require_login
  4.  
  5.   private
  6.   def require_login
  7.     redirect_to new_sessions_path unless session[:user_id] || controller_name=="sessions"
  8.   end
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement