Skip to content

Instantly share code, notes, and snippets.

@brand-it
Created October 5, 2009 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brand-it/202511 to your computer and use it in GitHub Desktop.
Save brand-it/202511 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
before_filter :set_current_user
protected
def set_current_user
# Call in model with User.current_user
User.current_user = self.current_user
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment