mongoid-history v0.4.0 Release Notes

Release Date: 2013-06-12 // almost 11 years ago
    • ➕ Added Mongoid::History.disable and Mongoid::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 format original=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 to Tracker class for nicer change summaries - @johnnyshields and @tstepp.
    • Refactored and exposed #trackable_parent_class in Tracker, 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 of Mongoid.purge! - @johnnyshields.
    • Tests: Remove dependency on non-committed file mongoid.yml and hardcode collection to mongoid_history_test - @johnnyshields.