@@ -0,0 +1,6 @@
+class AnalysisSummary < ActiveRecord::Base
+  belongs_to :analysis
+
+  scope :by_popularity, -> { where.not(commit_count: 0).order(commit_count: :desc) }
+  scope :thirty_day_summaries, -> { where(type: 'ThirtyDaySummary') }
+end
Why is this preferable to creating a derived class `class ThirtyDaySummary < AnalysisSummary` since the table is STI already? The current `ThirtyDaySummary` model has some model specific behavior. Are you thinking that we could create the derived class if and when needed?