Im reading the Rails guides for Rails 3 and they use this method:
cattr_accessor :attribute
What is this method? Is it a Rails method? I’ve never seen it before.
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.
It is a rails thing. Basically like the attr_* methods, but for the class level. One thing you wouldn’t expect is because it uses a backing @@ variable, the value shared between the class and all instances.