order user moods by recorded_at

This commit is contained in:
Christophe Robillard 2026-02-26 11:05:15 +01:00
parent 801b9332bd
commit c5c70c91ba

View file

@ -1,7 +1,7 @@
class User < ApplicationRecord
has_secure_password
has_many :sessions, dependent: :destroy
has_many :moods
has_many :moods, -> { order "recorded_at" }
normalizes :email_address, with: ->(e) { e.strip.downcase }