]> cat aescling's git repositories - mastodon.git/commitdiff
Fix order of attachments (see #269)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 28 Nov 2016 12:49:42 +0000 (13:49 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 28 Nov 2016 12:49:55 +0000 (13:49 +0100)
app/models/media_attachment.rb

index bfbf00d762c51ff864ea22bf32bc6d06387be1bf..f1b9b81121e6642a54eb45abc85b8b487b003e35 100644 (file)
@@ -16,6 +16,8 @@ class MediaAttachment < ApplicationRecord
 
   validates :account, presence: true
 
+  default_scope { order('id asc') }
+
   def local?
     remote_url.blank?
   end