Welcome to mirror list, hosted at ThFree Co, Russian Federation.

users_star_project.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0dfe597317e3617b8045262acbccda9a8bdd0cdd (plain)
1
2
3
4
5
6
7
8
class UsersStarProject < ActiveRecord::Base
  belongs_to :project, counter_cache: :star_count, touch: true
  belongs_to :user

  validates :user, presence: true
  validates :user_id, uniqueness: { scope: [:project_id] }
  validates :project, presence: true
end