ruby - What is purpose of around_create callback in Rails Model? -


During execution of the callback code, in what situation should we use it?

This question has also been answered, and now the answer is: around_create Originally a before_create and in one method, after_create you must use yield to save.

  class MyModel & lt; ActiveRecord :: Base around_create: my_callback_method Private def my_call_back_method # Some "before_create" stuff available here # this saves ##

Comments