-
-
Save garybernhardt/1591551 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
# Hash form: | |
{ | |
:current_user => "CurrentUser.current_user" | |
} | |
# Discovery form with inverted app structure: | |
module Injectables | |
def current_user(session) | |
User.find(:id => session['current_user_id']) | |
end | |
end | |
# A whole class seems like overkill. Then again, we've talked about | |
# injectables without fixed names. That's scary, though, because we | |
# can't ensure no clashes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment