-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
when delete a record by nested attributes _destroy function, updated_at & guests_count
of parent model is not updated.
class Event fields :guests_count, type: Integer, default: 0 has_many :guests, dependent: :destroy accepts_nested_attributes_for guests, reject_if: :all_blank, allow_destroy: true end
class Guest belongs_to :event, counter_cache: true, touch: true end