Order Transactions by Date

Christopher Vollick created

In my testing the natural order just happened to be the date order
because I had so little data.

But in the real world we should probably be more explicit!

Change summary

lib/customer_finacials.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

lib/customer_finacials.rb 🔗

@@ -59,7 +59,9 @@ class CustomerFinancials
 			created_at,
 			amount,
 			note
-		FROM transactions WHERE customer_id = $1;
+		FROM transactions
+		WHERE customer_id = $1
+		ORDER BY created_at;
 	SQL
 
 	def transactions