-
Notifications
You must be signed in to change notification settings - Fork 91
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
Error on 'save method' #1
Comments
Hmmmm. That was a late change I made to make the example look closer to the The main point about the change is that explicitly assigned and dynamically I will review this evening what the assignment to @id caused. thanks On Mon, Mar 7, 2016 at 1:48 AM, John Kang [email protected] wrote:
|
Could you share with me a scenario that demonstrates the error you found? Here is what I encountered with an adhoc script in the rails console
|
@ejavaguy , @biniprc I think this error is related to the PR that I opened here #4 and there is another one here #5 . Sorry that I did two separated PR but I discovered on different times. Excellent course by the way 👍 |
It seems that there are some errors in the code on adding 'save method'
I tried this code
def save
Rails.logger.debug {"saving #{self}"}
end
And it didn't work so I changed it to the code in the lecture video like following,
self.class.collection.insert_one(_id:@id, city:@city, state:@State, pop:@pop)
And this worked
Please check if it's right or wrong.
The text was updated successfully, but these errors were encountered: