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

project_snippet.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5fba6baa204e19953e9753546397f2bb0882b54d (plain)
1
2
3
4
5
6
7
8
9
10
11
class ProjectSnippet < Snippet
  belongs_to :project
  belongs_to :author, class_name: "User"

  validates :project, presence: true

  # Scopes
  scope :fresh, -> { order("created_at DESC") }

  participant :author, :notes
end