class

Ralph::DeleteRestrictionError

Inherits Ralph::Error / Exception / Reference / Object

Raised when trying to destroy a record with dependent: :restrict_with_exception

Example

class User < Ralph::Model
  has_many :posts, dependent: :restrict_with_exception
end

user.destroy # => Ralph::DeleteRestrictionError: Cannot delete User because posts exist

Constructors

new(association : String)
Source