mongoid-tags-arent-hard icon indicating copy to clipboard operation
mongoid-tags-arent-hard copied to clipboard

Mongoid4 Compatibility

Open shaneog opened this issue 11 years ago • 1 comments

This is the beginning of a Mongoid 4 compatible version of this gem.

I've set up Travis-CI to run the test suite against multiple Mongoid versions and Rubies, defaulting to Mongoid ~>3.1

This is not ready to merge yet. I'm using this PR as a base for discussion.

The only failing test is that adding to the tags using << does not correctly reflect changes in the document:

foo.send("tags=", [])
foo.send("tags") << ["foo", "bar"]
foo.changed => ["tags"]
foo.changed? => false
foo.changes => {}

I'm kind of out of ideas now, it's my first time playing with Mongoid internals and I'm not sure if this is a problem with the Mongoid gem itself, or with this one.

shaneog avatar Jan 22 '14 23:01 shaneog

Hmm.... not really sure I know the answer. I don't use Mongo, or this gem anymore. I wrote it for a client I had a year ago. I'm sure it's probably something pretty obvious, but I don't really have the mind share to devote to this right now. Sorry. I'm sure you'll nail it given a bit of time. Plus, you'll learn a lot more about how Mongoid works!

Thanks.

markbates avatar Jan 23 '14 19:01 markbates