2018-07-25 09:30:33 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-03-24 15:26:49 +00:00
|
|
|
class ProjectSnippet < Snippet
|
|
|
|
belongs_to :project
|
|
|
|
belongs_to :author, class_name: "User"
|
|
|
|
|
|
|
|
validates :project, presence: true
|
|
|
|
|
|
|
|
# Scopes
|
|
|
|
scope :fresh, -> { order("created_at DESC") }
|
2016-04-29 23:02:28 +00:00
|
|
|
|
2016-05-26 11:38:28 +00:00
|
|
|
participant :author
|
|
|
|
participant :notes_with_associations
|
2013-03-24 15:26:49 +00:00
|
|
|
end
|