Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ApplicationController < ActionController::Base
- include ExceptionNotifiable
- include AuthenticatedSystem
- before_filter do |c|
- User.current_user = User.find(c.session[:user_id]) unless c.session[:user_id].nil?
- end
- helper :all # include all helpers, all the time
- helper_method :current_user, :logged_in?
- # See ActionController::RequestForgeryProtection for details
- # Uncomment the :secret if you're not using the cookie session store
- protect_from_forgery :secret => '94d50c8c670e8ae657fd711a57a57ad6'
- def anonomous_required
- !logged_in? || redirect_back_or_default('/')
- end
- end
Add Comment
Please, Sign In to add comment