Created
September 27, 2013 01:06
-
-
Save andyhite/6722858 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController | |
before_filter :override_current_user | |
... | |
private | |
def override_current_user | |
class_eval <<-METHODS, __FILE__, __LINE__ + 1 | |
def current_user_with_sharding | |
do_stuff | |
current_user | |
do_other_stuff | |
end | |
alias_method_chain :current_user, :sharding | |
METHODS | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment