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

fix

parent 1a1a5fda
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,11 @@ class University::Person::Experience < ApplicationRecord
before_validation :create_organization_if_needed
scope :ordered, -> { order(from_year: :desc) }
scope :recent, -> { order(from_year: :desc, created_at: :desc).limit(10) }
scope :recent, -> {
where.not(from_year: nil)
.order(from_year: :desc, created_at: :desc)
.limit(10)
}
def to_s
persisted? ? "#{description}"
......
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