By default, Mongoid History will now track all actions (create, update, and destroy.) Previously, only update actions were tracked by default.
To preserve the old behavior, please modify your call to track_history as follows:
track_history ...
track_create: false,
track_destroy: falseSee #207 for more information.
When an error is raised in a call to create, update or destroy a tracked model, any history track
created before the call will now be deleted. In the past this was a problem for associations marked
dependent: :restrict.
See #202 for more information.
See #189 for more information.
- Currently, the
:alloption behaves identically to:fields. Future versions will track all fields and relations of trackable class when using:all.
Mongoid::History no longer supports the userstamp natively. To track the User in the application who created the HistoryTracker, add the Mongoid::Userstamp gem to your HistoryTracker class.
class MyHistoryTracker
include Mongoid::History::Tracker
include Mongoid::Userstamp
endRename the field.
MyHistoryTracker.all.rename(modifier_id: :created_by)