I looked at https://apidock.com/rails/ActiveRecord/Callbacks/before_update and it says before_update got deprecated. Does anybody know why that is and what would be the alternative?
I have some code logic that needs to run specifically when an existing record is updated. Before_save is called on both create and update, so I can't use that.
Edit: I guess I can do before_save :do_stuff, if: !self.new_record? but I find this still odd..
Edit2: !self.new_record? inside the if: block doesn't work. I need to put the !self.new_record? logic inside the actual method.