fixes specs

This commit is contained in:
rgarcia
2016-12-29 12:47:57 +01:00
parent 2a0267a1af
commit 43c18d58ac

View File

@@ -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