Files
fizzy/app/models/event.rb
T
2025-01-13 14:21:47 +00:00

13 lines
390 B
Ruby

class Event < ApplicationRecord
include Assignments, Comment, Stages
belongs_to :creator, class_name: "User"
belongs_to :summary, touch: true, class_name: "EventSummary"
has_one :account, through: :creator
scope :chronologically, -> { order created_at: :asc, id: :desc }
scope :non_boosts, -> { where.not action: :boosted }
scope :boosts, -> { where action: :boosted }
end