order user moods by recorded_at
This commit is contained in:
parent
801b9332bd
commit
c5c70c91ba
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
class User < ApplicationRecord
|
class User < ApplicationRecord
|
||||||
has_secure_password
|
has_secure_password
|
||||||
has_many :sessions, dependent: :destroy
|
has_many :sessions, dependent: :destroy
|
||||||
has_many :moods
|
has_many :moods, -> { order "recorded_at" }
|
||||||
|
|
||||||
normalizes :email_address, with: ->(e) { e.strip.downcase }
|
normalizes :email_address, with: ->(e) { e.strip.downcase }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue