just encountered the following code in RoR 3.2.8. Does that mean that self belongs to the merge function or to the class?
results.merge(
profile: self)
Any help will be appreciated
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.
Depends on the context. ie. where you found this line of code.
In this case “self” will be referring to the object “p”, which is the current object in the context where “self” is used.