Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Correcting findAndModify with upsert for Mongo >= 2.2.0 #83

Merged
merged 1 commit into from
Oct 3, 2012

Conversation

jonhyman
Copy link
Contributor

@jonhyman jonhyman commented Oct 2, 2012

find_and_modify with upserts is broken in Mongoid for Mongo >= 2.2.0 due to the findAndModify change returning nil instead of {}. It seems like you made a typo, returning [] instead of {}. The spec for this just asserted that the result should be_empty, which [] responds to affirmatively.

This pull request updates both.

durran added a commit that referenced this pull request Oct 3, 2012
Correcting findAndModify with upsert for Mongo >= 2.2.0
@durran durran merged commit e0818f7 into mongoid:master Oct 3, 2012
@durran
Copy link
Member

durran commented Oct 3, 2012

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants