gioco
gioco copied to clipboard
Couldn't find User with 'id'=all
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]
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.
I'll check it @Singularusrex If you want, you can also try our pro version (http://gioco.pro)
Great, thanks for getting back to me so quickly.
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.
btw, your premium tool looks great!
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.
@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