Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- before_filter :require_login, :except => [:index, :show]
- def require_login
- if not current_user
- flash[:error] = "You must be logged in to perform this action"
- store_location
- redirect_to login_url
- end
- end
Add Comment
Please, Sign In to add comment