I'm pretty new to Ruby and Mongo and I'm having an issue using MongoModel
Here is some code I have created.
https://codetique.com/LGko0F7V (you can click any line to leave a comment)
I'm trying to use mongo to store my user data. The authorize route should only create a new user entry if it can't find one already in the database. The problem is that I must not be using find correctly because it never seems to find a pre-existing user entry and creates a duplicate. I looked at the example you have on the site but it doesn't make it clear to me how I search my entries.
In the mongo console I would do something like this
db.users.find({email: "
f...@bar.com"});
That doesn't seem to work in Mongo Model. I have tried both User.find(email) and User.find({:email => email})
Could you please advise me on what I'm doing wrong?