Fixed issue in concern that was causing some tests to fail

This commit is contained in:
Juan Salvador Pérez García
2018-06-18 12:29:34 +02:00
parent 33b3431c70
commit a00f1f7eaf

View File

@@ -47,7 +47,7 @@ class ProposalDashboardAction < ActiveRecord::Base
scope :resources, -> { where(action_type: 'resource') }
scope :proposed_actions, -> { where(action_type: 'proposed_action') }
scope :active_for, ->(proposal) do
published_at = proposal.published_at || Date.today
published_at = proposal.published_at&.to_date || Date.today
active
.where('required_supports <= ?', proposal.votes_for.size)