Defect #34999 » fix_attachment_test2.diff
app/models/attachment.rb | ||
---|---|---|
370 | 370 |
def self.latest_attach(attachments, filename) |
371 | 371 |
return unless filename.valid_encoding? |
372 | 372 | |
373 |
attachments.sort_by(&:created_on).reverse.detect do |att|
|
|
373 |
attachments.sort_by{|attachment| [attachment.created_on, attachment.id]}.reverse.detect do |att|
|
|
374 | 374 |
filename.casecmp?(att.filename) |
375 | 375 |
end |
376 | 376 |
end |
- « Previous
- 1
- 2
- Next »