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

Couldn't find User with 'id'=all #71

Open
Sigularusrex opened this issue Feb 12, 2015 · 7 comments
Open

Couldn't find User with 'id'=all #71

Sigularusrex opened this issue Feb 12, 2015 · 7 comments

Comments

@Sigularusrex
Copy link

Hello, I'm getting the following error when I try adding a badge

ActiveRecord::RecordNotFound: Couldn't find User with 'id'=all

I have set up according to the docs. The command I'm using is
rake gioco:add_badge[blank_canvas,0,author,true]

@Sigularusrex
Copy link
Author

I just checked the admin panel of my app, it looks like it has added (Multiple times) The kind has also been added once. but badges haven't been assigned to anyone.

@joaomdmoura
Copy link
Owner

I'll check it @Singularusrex
If you want, you can also try our pro version (http://gioco.pro)

@Sigularusrex
Copy link
Author

Great, thanks for getting back to me so quickly.

@Sigularusrex
Copy link
Author

Additionally,
kind = Kind.where(:name => "author")
user.change_points({ points: 100, kind: kind.id })

is giving me:
undefined method `id' for #Kind::ActiveRecord_Relation:0x007f8c39d0b958

It looks like very little is working at the moment.

@Sigularusrex
Copy link
Author

btw, your premium tool looks great!

@joaomdmoura
Copy link
Owner

Yeah @Sigularusrex I haven't maintaining Gioco for a while, I was deeply focused on Gioco Pro. But we, as a company, plan to keep the Open Source project alive! As soon as I finish a WIP that I'm involved with Active Model Serializer I will try to fix the major bugs and update the gem to work with new versions.

Right now I strongly recommend you to user Gioco Pro, we have an awesome support team, and if you decide to use it I may give you another 30-days trial :) Just reach me out at joaomdmoura[at]gioco[dot]pro in case you need anything.

@brettcave
Copy link

@Sigularusrex try using kind = Kind.find_by(:name => "author") instead of .where - it will return the correct object type that has an id attribute.

#78 has been submitted to resolve applying default badges to all users (incorrectly referencing #17).

You can apply the fix in your local gioco.rake (the example below based on a User model):

L24:

resources = User.all

L27:

.... :kind_id => kind.id

joaomdmoura added a commit that referenced this issue Jul 14, 2016
#71 - default badges and documentation
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