Files
fizzy/app/models/bubble/boostable.rb
T
2024-10-16 16:41:11 -06:00

15 lines
248 B
Ruby

module Bubble::Boostable
extend ActiveSupport::Concern
included do
scope :ordered_by_boosts, -> { order boost_count: :desc }
end
def boost!
transaction do
increment! :boost_count
track_event :boosted
end
end
end