debian-mirror-gitlab/app/models/project_snippet.rb
2016-06-02 11:05:42 +05:30

11 lines
227 B
Ruby

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