mongoid / mongoid-history

Multi-user non-linear history tracking, auditing, undo, redo for mongoid.
https://rubygems.org/gems/mongoid-history
MIT License
393 stars 129 forks source link

Small refactor of relations. #216

Closed dblock closed 6 years ago

dblock commented 6 years ago

Taking some of the working parts out of #215.

Extracts increment_current_version.

Simplifies fetching of the relation's class or type of relationship by always looking at reflect_on_association and memoizing the result.

Collapses embeds_many_class and embeds_one_class into relation_class_of.

Renames methods from embedded to related so we can continue extending into many-to-many and such.

mongoid-bot commented 6 years ago
1 Warning
:warning: Unless you’re refactoring existing code, please update CHANGELOG.md.

Here's an example of a CHANGELOG.md entry:

* [#216](https://github.com/mongoid/mongoid-history/pull/216): Small refactor of relations - [@dblock](https://github.com/dblock).

Generated by :no_entry_sign: danger

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling 5308b65afd3acbaa72787247ca2c4993cf4d7f4d on dblock:refactor-relations into on mongoid:master.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling 5308b65afd3acbaa72787247ca2c4993cf4d7f4d on dblock:refactor-relations into on mongoid:master.