diff --git a/README.md b/README.md index a5827e4ec..a0433b22b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Growstuff [![Build Status](https://travis-ci.org/Growstuff/growstuff.svg?branch=dev)](https://travis-ci.org/Growstuff/growstuff) -[![Coverage Status](https://coveralls.io/repos/Growstuff/growstuff/badge.png)](https://coveralls.io/r/Growstuff/growstuff) +[![Coverage Status](https://coveralls.io/repos/github/Growstuff/growstuff/badge.svg?branch=dev)](https://coveralls.io/github/Growstuff/growstuff?branch=dev) [![Code Climate](https://codeclimate.com/github/Growstuff/growstuff/badges/gpa.svg)](https://codeclimate.com/github/Growstuff/growstuff) Welcome to the Growstuff project. diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index 3a4766637..6b7420cba 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -26,8 +26,8 @@ class Notifier < ApplicationMailer def planting_reminder(member) @member = member - @plantings = @member.plantings.first(5) - @harvests = @member.harvests.first(5) + @plantings = @member.plantings.order(planted_at: :desc).first(5) + @harvests = @member.harvests.order(harvested_at: :desc).first(5) # Encrypting message = { member_id: @member.id, type: :send_planting_reminder }