We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
select
1 parent 1c75abe commit d62a8a9Copy full SHA for d62a8a9
app/controllers/admin/payments_controller.rb
@@ -30,6 +30,7 @@ def index
30
@late_activities = Activity.debtors.select do |activity|
31
(Date.today.prev_occurring(:friday) - activity.payable_updated_at).to_i >= 21 && activity.is_payable
32
end
33
+
34
@late_payments =
35
@late_activities.map do |activity|
36
activity.attendees.select do |participant|
@@ -39,7 +40,9 @@ def index
39
40
(participant.price.nil? &&
41
activity.price && activity.price > 0)
42
)
- end.map(&:member)
43
+ # Somehow there were `nil` members in this list, not sure how we got there,
44
+ # but the `select` makes the page useable.
45
+ end.map(&:member).select{ |member| member != nil }
46
end.flatten.uniq
47
@late_unpayable_activities = Activity.late_unpayable
48
0 commit comments