Thursday, August 05, 2010

hobo_migration show wrong number of arguments (1 for 2)

Complete modify my hobo model, when I run the generator,

ruby script\generate hobo_migration

I get this immediately.
wrong number of arguments (1 for 2)

Google is pretty helpful,
One of the development give the hint : something wrong with the field entry.

It seems I just make a search and replace for some field,because I just found out Hobo doesn't accept :scale => 2 . You need to define the limit elsewhere. So when I fix use the editor replace to remove all :scale => 2, it empties all the model fields. e.g.

vehicle_value :decimal , scale => 2
becomes
vehicle_value


I can't blame Netbeans editor because I am not suppose to do a mass replace without knowing the default editor replace functionality.

Just go through every model file (since I am using hobo), put back the correct definition, it works.

Labels: , ,