-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Callbacks
ActiveRecord allows:
after_commit on: %i(create update) { do_something }
Trying this in Mongoid (with after_save instead of after_commit) produces:
Failure/Error: after_save(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) } ArgumentError: Unknown key: :on. Valid keys are: :if, :unless, :prepend
- duplicates
-
MONGOID-4975 Add callbacks to Mongoid::Documents related to Mongo transactions
- Closed