Sha256: 241553fb946f7f1164e4642e7f295cab7c78a6236b67355d4616d16c6bed00e7
Contents?: true
Size: 234 Bytes
Versions: 8
Compression:
Stored size: 234 Bytes
Contents
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
8 entries across 8 versions & 1 rubygems