Open
Description
Hi I have a scenario in that i have updated the embedded_document using nested attributes but it is not getting tracked but the changes in the outer document are getting tracked can I know how to get that working?
the following is the tracking_history initialization in the models
#invoice.rb
class Invoice
include Mongoid::Document
include Mongoid::Attributes::Dynamic
include Mongoid::Timestamps
include Mongoid::History::Trackable
embeds_many :invoice_details
accepts_nested_attributes_for :invoice_details
track_history :on => :all
end
#invoice_detail.rb
class InvoiceDetail
include Mongoid::Document
include Mongoid::Attributes::Dynamic
include Mongoid::Timestamps
include Mongoid::History::Trackable
embedded_in :invoice
track_history :on=> :all,
:scope => :invoice,
:track_create => true,
:track_destroy => true
end