Sha256: 180a0bd6ee6099e44e4a666bbd6e50ca88a1e9649440bd2d8410f7107e66abab
Contents?: true
Size: 267 Bytes
Versions: 4
Compression:
Stored size: 267 Bytes
Contents
# frozen_string_literal: true class LessonError < Exception end class Lesson < ActiveRecord::Base has_and_belongs_to_many :students before_destroy :ensure_no_students def ensure_no_students raise LessonError unless students.empty? end end
Version data entries
4 entries across 4 versions & 1 rubygems