gitlab-org--gitlab-foss/app/models/project_snippet.rb

12 lines
227 B
Ruby
Raw Normal View History

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