79754323

Date: 2025-09-03 08:31:37
Score: 1.5
Natty:
Report link

Rails 4 Returning false in before_* or around_* callbacks would halt the callback chain and stop the save.

Rails 5+ Returning false is ignored. Instead, you must use throw(:abort) to halt the save (for both before_* and around_* callbacks).

So yes — in around_save as well, you need to use throw(:abort) if you want to halt before yielding.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Nitesh Choudhary