Ruby on Rails Explained
before_save
Dec 15, 2018 - Daniel Viklund
ActiveRecord
has a lot of callbacks but probably one of the most frequently used ones is before_save
. There are a few other ones that are very similar like before_create
and before_update
, but they are just more narrowly scoped callbacks hat otherwise does the same thing.