core/app/models/gaku/level.rb in gaku-0.0.3 vs core/app/models/gaku/level.rb in gaku-0.1.0
- old
+ new
@@ -5,9 +5,10 @@
has_many :program_levels
has_many :programs, through: :program_levels
validates :name, :school, presence: true
+ validates :name, uniqueness: true
def to_s
name
end