mongoid-history v0.4.0 Release Notes
Release Date: 2013-06-12 // almost 11 years ago-
- ➕ Added
Mongoid::History.disable
andMongoid::History.enabled?
methods for global tracking disablement - @johnnyshields. - ➕ Added
:changes_method
that optionally overrides which method to call to collect changes - @joelnordel. - The
:destroy
action now stores trackers in the formatoriginal=value, modified=nil
(previously it was the reverse) - @johnnyshields. - 👌 Support for polymorphic embedded classes - @tstepp.
- 👌 Support for Mongoid field aliases, e.g.
field :n, as: :name
- @johnnyshields. - Support for Mongoid embedded aliases, e.g.
embeds_many :comments, store_as: :coms
- @johnnyshields. - 🔄 Added
#tracked_changes
and#tracked_edits
methods toTracker
class for nicer change summaries - @johnnyshields and @tstepp. - Refactored and exposed
#trackable_parent_class
inTracker
, which returns the class of the trackable regardless of whether the trackable itself has been destroyed - @johnnyshields. - Added class-level
#tracked_field?
and#tracked_fields
methods; refactor logic to determine whether a field is tracked - @johnnyshields. - 🛠 Fixed bug in Trackable#track_update where
return
condition at beginning of method caused a short-circuit where memoization would not be cleared properly - @johnnyshields. - ✅ Tests: Added spec for nested embedded documents - @matekb.
- ✅ Tests: Test run time cut in half (~2.5s versus ~5s) by using
#let
helper and removing class initialization before each test - @johnnyshields. - 🚚 Tests: Remove
database_cleaner
gem in favor ofMongoid.purge!
- @johnnyshields. - Tests: Remove dependency on non-committed file
mongoid.yml
and hardcode collection tomongoid_history_test
- @johnnyshields.
- ➕ Added