lib/active_model/callbacks.rb in activemodel-7.0.2.4 vs lib/active_model/callbacks.rb in activemodel-7.0.3

- old
+ new

@@ -30,11 +30,11 @@ # run_callbacks :create do # # Your create action methods here # end # end # - # Then in your class, you can use the +before_create+, +after_create+ and + # Then in your class, you can use the +before_create+, +after_create+, and # +around_create+ methods, just as you would in an Active Record model. # # before_create :action_before_create # # def action_before_create @@ -82,10 +82,10 @@ # # define_model_callbacks :create, only: :after # define_model_callbacks :update, only: :before # define_model_callbacks :destroy, only: :around # - # Would create +after_create+, +before_update+ and +around_destroy+ methods + # Would create +after_create+, +before_update+, and +around_destroy+ methods # only. # # You can pass in a class to before_<type>, after_<type> and around_<type>, # in which case the callback will call that class's <action>_<type> method # passing the object that the callback is being called on.