KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In ActiveRecord model after_save callback I need to ROLLBACK transaction and return false. def after_save_callback if mycondition? raise ActiveRecord::Rollback end end This callback rolls-back transaction but mymodel.save! returns true. How to make it return false and rollback?
Tags (comma-separated)
Save Edits
Cancel