Created
January 14, 2013 17:58
-
-
Save ChangJoo-Park/4531933 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
def current_user | |
@current_user ||= User.find(session[:user_id]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment