diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index 898ad9949..ee241c49b 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -27,8 +27,8 @@ class ProposalsController < ApplicationController def index_customization load_retired - load_featured load_proposal_ballots + load_featured if @proposal_ballots.blank? end def vote diff --git a/app/models/proposal.rb b/app/models/proposal.rb index cddcdcbf8..4c3cc9e40 100644 --- a/app/models/proposal.rb +++ b/app/models/proposal.rb @@ -44,7 +44,6 @@ class Proposal < ActiveRecord::Base scope :sort_by_random, -> { reorder("RANDOM()") } scope :sort_by_relevance, -> { all } scope :sort_by_flags, -> { order(flags_count: :desc, updated_at: :desc) } - scope :archived, -> { where("proposals.created_at <= ?", 1.year.ago)} scope :last_week, -> { where("proposals.created_at >= ?", 7.days.ago)} scope :retired, -> { where.not(retired_at: nil) } scope :not_retired, -> { where(retired_at: nil) } diff --git a/app/views/proposal_ballots/_featured_successfull_proposal.html.erb b/app/views/proposal_ballots/_featured_successfull_proposal.html.erb index 97754ce9c..3cc18a992 100644 --- a/app/views/proposal_ballots/_featured_successfull_proposal.html.erb +++ b/app/views/proposal_ballots/_featured_successfull_proposal.html.erb @@ -1,3 +1,3 @@ -
+

<%= link_to proposal.title, proposal_ballots_path %>

diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 93574c1ad..5dee606d0 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -32,7 +32,7 @@ <% end %> <% if @proposal_ballots.present? %> -