sinatra-authentication icon indicating copy to clipboard operation
sinatra-authentication copied to clipboard

id instead of _id with dm-core

Open Incubatio opened this issue 14 years ago • 0 comments

I'm using this authentication system with datamapper over mongo-db. Signup works but insert a dm-user with two id field:

  • "_id" that contains the identifier of the records
  • "id" which is null.

During a log in, if the user and password are correct, the user is logged in as the user nil, and is consequently staying a guest.

Edit: I fixed my particular problem by overriding the DmUsers class and replacing Serial by the type: ObjectId and by adding "require 'mongo_adapter'" which include the support for that specific mongo type

Incubatio avatar Jun 05 '11 06:06 Incubatio