diff --git a/app/models/event.rb b/app/models/event.rb index 78512132b..95977dada 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -8,6 +8,6 @@ class Event < ApplicationRecord has_one :account, through: :creator scope :chronologically, -> { order created_at: :asc, id: :desc } - scope :unfurled, -> { where.not action: :boosted } - scope :furled, -> { where action: :boosted } + scope :non_boosts, -> { where.not action: :boosted } + scope :boosts, -> { where action: :boosted } end diff --git a/app/models/event_summary.rb b/app/models/event_summary.rb index 57a0dead8..530bd2d00 100644 --- a/app/models/event_summary.rb +++ b/app/models/event_summary.rb @@ -3,5 +3,9 @@ class EventSummary < ApplicationRecord attr_accessor :bubble - has_many :events, -> { chronologically }, dependent: :delete_all, inverse_of: :summary + has_many :events, -> { chronologically }, dependent: :delete_all, inverse_of: :summary do + def grouped_boosts + boosts.group_by(&:creator) + end + end end diff --git a/app/views/event_summaries/_event_summary.html.erb b/app/views/event_summaries/_event_summary.html.erb index 200cac2f9..576f64ce9 100644 --- a/app/views/event_summaries/_event_summary.html.erb +++ b/app/views/event_summaries/_event_summary.html.erb @@ -1,7 +1,7 @@