I wanted to add a hook to before_save. Validation occurs before calling "before_save", so I moved it to before_validation: on =>: save.
Now the problem is when I do @ object.save_without_validation (sometimes I had to use this). my hook before_validation is not called.
Am I missing something or is there a more reliable way to add to the hook that works for both cases?
Hi, when you save the object, you have the following callbacks
* before_validation * after_validation * before_save * after_save * before_create * around_create * after_create
try to put your code inside after_validation
after_validation