gitlab-org--gitlab-foss/app/models/lfs_objects_project.rb
2016-06-03 11:10:17 +02:00

8 lines
283 B
Ruby

class LfsObjectsProject < ActiveRecord::Base
belongs_to :project
belongs_to :lfs_object
validates :lfs_object_id, presence: true
validates :lfs_object_id, uniqueness: { scope: [:project_id], message: "already exists in project" }
validates :project_id, presence: true
end