From a1be74ed2d3c8dadc194b858e69fdb0eebc1c95c Mon Sep 17 00:00:00 2001 From: Hugo Peixoto Date: Sun, 19 Mar 2023 15:38:19 +0000 Subject: [PATCH] Sort member contributions by payment date --- app/views/members/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/members/show.html.erb b/app/views/members/show.html.erb index ac4a26f..75f9186 100644 --- a/app/views/members/show.html.erb +++ b/app/views/members/show.html.erb @@ -33,7 +33,7 @@ <%= t('contributions.attributes.payment_reference') %> <%= t('contributions.attributes.amount') %> - <% @member.contributions.each do |contribution| %> + <% @member.contributions.order(payment_on: :asc).each do |contribution| %> <%= contribution.payment_on %> <%= contribution.payment_method %>