Merge branch 'master' into 'master'

fix sort error



See merge request !8
This commit is contained in:
wmcheng 2019-11-18 21:57:03 +08:00
commit 23a955e0d6
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class ArchivesController < ApplicationController
} }
end end
files = [] files = []
archive.archive_file_multiples.each do |file| archive.archive_file_multiples.order_by(:sort_number=>'desc').each do |file|
if file.choose_lang.include?(I18n.locale.to_s) if file.choose_lang.include?(I18n.locale.to_s)
title = (file.file_title.blank? ? File.basename(file.file.path) : file.file_title) rescue "" title = (file.file_title.blank? ? File.basename(file.file.path) : file.file_title) rescue ""
extension = file.file.file.extension.downcase rescue "" extension = file.file.file.extension.downcase rescue ""