Skip to content
Snippets Groups Projects
Commit 841b79ca authored by Arnaud Levy's avatar Arnaud Levy
Browse files

order

parent 58eb9987
No related branches found
No related tags found
No related merge requests found
......@@ -57,8 +57,8 @@ class Communication::Website::Agenda::Event < ApplicationRecord
class_name: 'Communication::Website::Agenda::Event',
optional: true
scope :ordered, -> { order(from_day: :desc) }
scope :recent, -> { order(from_day: :desc).limit(5) }
scope :ordered, -> { order(from_day: :desc, from_hour: :desc) }
scope :recent, -> { ordered.limit(5) }
validates_presence_of :from_day
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment