Rails5からコールバック処理を停止する方法が変わった

今知ったので書く。これまでActiveRecordのコールバック内でfalseを返していれば処理が停止していたが非推奨となり、停止したい場合はthrow(:abort)を呼ぶ方法に変わった。

Deprecated returning false as a way to halt Active Record callback chains. The recommended way is to throw(:abort).

http://guides.rubyonrails.org/5_0_release_notes.html