diff --git a/app/models/project_allocation.rb b/app/models/project_allocation.rb index f367716..538604c 100644 --- a/app/models/project_allocation.rb +++ b/app/models/project_allocation.rb @@ -582,7 +582,12 @@ def find_transaction end def status + return 'REJECTED' if funding_rejected? return invitation.status if invitation.present? return 'PAID' if find_transaction.present? end + + def success? + ['APPROVED', 'PAID'].include?(status) + end end diff --git a/app/views/funds/show.html.erb b/app/views/funds/show.html.erb index 5d88c05..d02b6f4 100644 --- a/app/views/funds/show.html.erb +++ b/app/views/funds/show.html.erb @@ -175,7 +175,7 @@ <% @project_allocations.each_with_index do |project_allocation, i| %> <% next if project_allocation.project_url.nil? %> - <% next if @allocation.completed? && !project_allocation.paid? %> + <% next if @allocation.completed? && !project_allocation.success? %>