Is it an "undefined method '+' on NilClass"? If so, you forgot to
assign a value to @plays before incrementing it. You might try
something like this instead:
def plays
@plays ||=3D 0
end
def plays=3D(v)
@plays =3D self.plays + 1
end
~ jf
--
John Feminella
Principal Consultant, BitsBuilder
LI:
http://www.linkedin.com/in/johnxf
SO:
http://stackoverflow.com/users/75170/
On Thu, Feb 17, 2011 at 23:04, Sam Duncan <> wrote:
> What is the content of @plays?
>
> Sam
>
>
> On 18/02/11 17:01, Danny L. wrote:
>>
>> hey guys the following line of code is producing a "undefined method
>> `+':
>>
>> =C2=A0@plays +=3D 1
>>
>>
>> cheers,
>>
>> Danny
>>
>>
>
>