Need help with an active record query in ruby on rails app with postgres
- I have "Customers" who have many "Notes".
- I want to grab the most recent note that each customer made.
- Then display a list of those notes from oldest to newest
My current query is
@all_notes = Note.where("account_note = ?", false).order(created_at: :desc)
Thank you