I am looking at this ruby code and they make reference to:
@current_user
and
self.current_user
what is the difference?
http://code.google.com/p/openplaques/source/browse/trunk/www/lib/authenticated_system.rb
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@current_useris an instance variable.self.current_usercalls the method on line 10 that returns that instance variable, first populating it if it is currently nil.