mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
site file changes: order by last edited file first, increase to 6 files
This commit is contained in:
parent
96ffe92ce3
commit
141bba6d62
1 changed files with 2 additions and 2 deletions
|
@ -6,8 +6,8 @@ class SiteChange < Sequel::Model
|
|||
one_to_one :site_change
|
||||
one_to_many :site_change_files
|
||||
|
||||
def site_change_filenames(limit=4)
|
||||
site_change_files_dataset.select(:filename).limit(limit).all.collect {|f| f.filename}.sort_by {|f| f.match('html') ? 0 : 1}
|
||||
def site_change_filenames(limit=6)
|
||||
site_change_files_dataset.select(:filename).limit(limit).order(:created_at.desc).all.collect {|f| f.filename}.sort_by {|f| f.match('html') ? 0 : 1}
|
||||
end
|
||||
|
||||
def self.record(site, filename)
|
||||
|
|
Loading…
Add table
Reference in a new issue