From: Eugen Rochko Date: Mon, 28 Nov 2016 12:49:42 +0000 (+0100) Subject: Fix order of attachments (see #269) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=f860d15d39687f43ff36930c3c079abe677ae098;p=mastodon.git Fix order of attachments (see #269) --- diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index bfbf00d76..f1b9b8112 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -16,6 +16,8 @@ class MediaAttachment < ApplicationRecord validates :account, presence: true + default_scope { order('id asc') } + def local? remote_url.blank? end