summaryrefslogtreecommitdiff
path: root/app/models/project_snippet.rb
blob: b3585c4cf4c582cc3366fec930f9a58ffe66cb5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 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