Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various Setup Bugs #67

Open
aaron-lorenz opened this issue Feb 23, 2014 · 3 comments
Open

Various Setup Bugs #67

aaron-lorenz opened this issue Feb 23, 2014 · 3 comments

Comments

@aaron-lorenz
Copy link

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

@joaomdmoura
Copy link
Owner

Thank you @towhead09 ! A lot of details that I haven't noticed!
I'll fix it asap and include this on the next version!
I'm also working on an enterprise edition that should be released as a SaaS soon and I'll include this fix into it!

@enter08
Copy link

enter08 commented Nov 28, 2014

For Rails 4, fixed rake_generator.rb (for correct gioco.rake file for badge generation), core.rb and rankings.rb files:
https://github.com/enter08/gioco

@joaomdmoura
Copy link
Owner

Tks @enter08 could you please open a PR? 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants