From 29f4edd466ac6a07df8f45daff13eeda9755e379 Mon Sep 17 00:00:00 2001 From: taitus Date: Fri, 24 Oct 2025 10:50:36 +0200 Subject: [PATCH] Remove unused scopes from Legislation::Proposal The "for_render", "sort_by_hot_score" and "sort_by_most_commented" scopes in Legislation::Proposal are no longer used anywhere in the code. They were all introduced in commit 335399e571 ("Created Legislation Proposals model") and have never been referenced since. --- app/models/legislation/proposal.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/models/legislation/proposal.rb b/app/models/legislation/proposal.rb index 63dc9221b..1f4fb6808 100644 --- a/app/models/legislation/proposal.rb +++ b/app/models/legislation/proposal.rb @@ -40,11 +40,8 @@ class Legislation::Proposal < ApplicationRecord before_save :calculate_hot_score, :calculate_confidence_score - scope :for_render, -> { includes(:tags) } - scope :sort_by_hot_score, -> { reorder(hot_score: :desc) } scope :sort_by_confidence_score, -> { reorder(confidence_score: :desc) } scope :sort_by_created_at, -> { reorder(created_at: :desc) } - scope :sort_by_most_commented, -> { reorder(comments_count: :desc) } scope :sort_by_title, -> { reorder(title: :asc) } scope :sort_by_id, -> { reorder(id: :asc) } scope :sort_by_supports, -> { reorder(cached_votes_score: :desc) }