Hi, i have a model that extends AcitveRecord::Base called PhoneUser. This table has a field called hits in it. This is set to default at 0. When I try and increment the value for hits in a controller I get the following error wrong number of arguments (1 for 0) and points to line 57 My code is @phone_user = PhoneUser.find(uaid) @phone_user.hits += 1 @phone_user.save If I remove the line @phone_user.hits += 1 then it works fine, with no errors Has anyone got any ideas
on 2007-07-27 17:27
on 2007-07-27 17:36
line 57 is the line @phone_user.save
on 2007-07-27 20:33
read the rails doc look at the AR function increment!