From: mortee Date: 2007-10-17T03:17:23+09:00 Subject: Re: Prevent attributes vs local variable conflict in activerecord models Simone Carletti wrote: > As you can see in the same method I have both a local variable called > width and an activerecord table column called width. > To prevent weird behaviors I used self to identify local object > accessor method but I don't know if this is the best practice to > prevent local variables to conflict with active record attributes. > > How do you usually handle this case? AFAIK, you can't assign to attributes without self at all, right because Ruby considers such assignments explicitely as creation or assignment of local variables. mortee