2018-07-25 05:30:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-03-24 11:26:49 -04: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 19:02:28 -04:00
|
|
|
|
2016-05-26 07:38:28 -04:00
|
|
|
participant :author
|
|
|
|
participant :notes_with_associations
|
2013-03-24 11:26:49 -04:00
|
|
|
end
|