Is ruby going to get confused if I use variable and @variable in the same method? If not, how about using variable and @variable in two different action methods but still in the same controller?
Thanks for helping
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.
No to both questions. Local variables and instance variables will not conflict with each other.
That said, for readability reasons, I would suggest changing one of them.