Method: Concept::SKOS::Base.recent

Defined in:
app/models/concept/skos/base.rb

.recent(limit = 5) ⇒ Object



34
35
36
37
38
39
40
41
42
# File 'app/models/concept/skos/base.rb', line 34

def self.recent(limit = 5)
  self
  .published
  .not_expired
  .joins(:notes => :annotations)
  .where(note_annotations: { predicate: 'created' })
  .order('note_annotations.value DESC')
  .limit(limit)
end