kaiho/app/models/version.rb
2018-08-05 12:37:35 +02:00

6 lines
181 B
Ruby

class Version < ApplicationRecord
belongs_to :branch
validates :number, presence: true
validates :date, presence: true
validates :number, uniqueness: { scope: :branch }
end