From 43c18d58ac33e01e0e190d69b0cc57cd15a32cba Mon Sep 17 00:00:00 2001 From: rgarcia Date: Thu, 29 Dec 2016 12:47:57 +0100 Subject: [PATCH] fixes specs --- app/models/proposal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/proposal.rb b/app/models/proposal.rb index cba6d04ba..2f0c76094 100644 --- a/app/models/proposal.rb +++ b/app/models/proposal.rb @@ -50,7 +50,7 @@ class Proposal < ActiveRecord::Base scope :last_week, -> { where("proposals.created_at >= ?", 7.days.ago)} scope :retired, -> { where.not(retired_at: nil) } scope :not_retired, -> { where(retired_at: nil) } - scope :successfull, -> { where("cached_votes_up + physical_votes >= ?", Proposal.votes_needed_for_success)} + scope :successfull, -> { where("cached_votes_up >= ?", Proposal.votes_needed_for_success)} def to_param "#{id}-#{title}".parameterize