BigW Consortium Gitlab

project_snippet.rb 316 Bytes
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

  def check_for_spam?
    super && project.public?
  end
end