kinesbea/spree_store_credits — comment on commit a1f5b561e6092f6385c2eb7f1f7225a6a53bc017
File:  line 0
By davidnorth:

This is an easier way to get that expiry date:

max_date = store_credits.where('remaining_amount > 0').maximum(:created_at)