class RecordNotDestroyed
Ruby on Rails 7.2.3
Since v4.0.13Raised by ActiveRecord::Base#destroy! when a record cannot be destroyed due to any of the before_destroy callbacks throwing :abort. See ActiveRecord::Callbacks for further details.
class User < ActiveRecord::Base before_destroy do throw :abort if still_active? end end User.first.destroy! # => raises an ActiveRecord::RecordNotDestroyed
Inherits from
Attributes
Methods (defined here)
- self. new