Hey,
Just setup in rails 3.2 and ran into a few problems...
in the gioco.rake file:
At line 13: the find_or_create_by throws an error...this can be solved by changing line to
badge_string = "kind = Kind.find_by_name('#{args.kind}') || Kind.create(:name=> '#{args.kind}')\n"
Line 27 has "kinds.id" should be
r.points << Point.create({ :kind_id => kind.id, :value => '#{args.points}'})
Also when the generator makes the Models, it will use the user input to name the "Resource" fields, however the foreign key in the Points table has "user_id" hard coded.
line 5 of the ModelGenerator should be
generate("model", "point #{@model_name}_id:integer kind_id:integer value:integer")
Thanks
Hey,
Just setup in rails 3.2 and ran into a few problems...
in the gioco.rake file:
At line 13: the find_or_create_by throws an error...this can be solved by changing line to
badge_string = "kind = Kind.find_by_name('#{args.kind}') || Kind.create(:name=> '#{args.kind}')\n"
Line 27 has "kinds.id" should be
r.points << Point.create({ :kind_id => kind.id, :value => '#{args.points}'})
Also when the generator makes the Models, it will use the user input to name the "Resource" fields, however the foreign key in the Points table has "user_id" hard coded.
line 5 of the ModelGenerator should be
generate("model", "point #{@model_name}_id:integer kind_id:integer value:integer")
Thanks