gitlab-org--gitlab-foss/app/models/project_snippet.rb
2018-07-26 16:55:41 -07:00

14 lines
289 B
Ruby

# frozen_string_literal: true
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
participant :notes_with_associations
end