From f860d15d39687f43ff36930c3c079abe677ae098 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 28 Nov 2016 13:49:42 +0100 Subject: [PATCH] Fix order of attachments (see #269) --- app/models/media_attachment.rb | 2 ++ 1 file changed, 2 insertions(+) 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