class Webpage < ApplicationRecord
def self.delete_all
raise ActiveRecord::DeleteRestrictionError
end
def delete
destroy
end
def destroy
raise ActiveRecord::DeleteRestrictionError
end
end
Webpage.destroy_all
# => `destroy': Delete restriction error. (ActiveRecord::DeleteRestrictionError)
Webpage.delete_all
# => `delete_all': Delete restriction error. (ActiveRecord::DeleteRestrictionError)
Webpage.first.destroy
# => `destroy': Delete restriction error. (ActiveRecord::DeleteRestrictionError)
Webpage.first.destroy!
# => `destroy': Delete restriction error. (ActiveRecord::DeleteRestrictionError)
Webpage.first.delete
# => `destroy': Delete restriction error. (ActiveRecord::DeleteRestrictionError)