Which Rails callback will be triggered on the event that either the record is going to be created or destroyed?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming that you’re referring to the use of ActiveRecord (the default ORM for Rails) the callbacks you are looking for are:
You can find high quality documentation on the Rails guides on this topic here: http://guides.rubyonrails.org/active_record_validations_callbacks.html