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

6 lines
167 B
Ruby

class Branch < ApplicationRecord
belongs_to :software
has_many :versions
validates :name, presence: true
validates :name, uniqueness: { scope: :software }
end