]> cat aescling's git repositories - mastodon.git/commitdiff
Removing default avatars
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 8 Sep 2016 16:23:59 +0000 (18:23 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 8 Sep 2016 16:23:59 +0000 (18:23 +0200)
app/assets/images/avatars/missing.png [deleted file]
app/assets/images/background-pattern.png [deleted file]
app/models/account.rb
spec/helpers/atom_builder_helper_spec.rb

diff --git a/app/assets/images/avatars/missing.png b/app/assets/images/avatars/missing.png
deleted file mode 100644 (file)
index 3cbc714..0000000
Binary files a/app/assets/images/avatars/missing.png and /dev/null differ
diff --git a/app/assets/images/background-pattern.png b/app/assets/images/background-pattern.png
deleted file mode 100644 (file)
index 9afda79..0000000
Binary files a/app/assets/images/background-pattern.png and /dev/null differ
index 8e0283ca162bb31670bb33cf7a43a05cfe817937..26434547211d4eb5aadb1afc5e5f3c15b88d6b46 100644 (file)
@@ -7,7 +7,7 @@ class Account < ApplicationRecord
   validates :username, presence: true, uniqueness: { scope: :domain, case_sensitive: true },  unless: 'local?'
 
   # Avatar upload
-  has_attached_file :avatar, styles: { large: '300x300#', medium: '96x96#', small: '48x48#' }, default_url: 'avatars/missing.png'
+  has_attached_file :avatar, styles: { large: '300x300#', medium: '96x96#', small: '48x48#' }
   validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\Z/
 
   # Header upload
index aa3589df008f7147912a7d7b51d53e64e0248190..7366b5b791252582915a448f14ee4990300084f8 100644 (file)
@@ -170,7 +170,7 @@ RSpec.describe AtomBuilderHelper, type: :helper do
     let(:account) { Fabricate(:account, username: 'alice') }
 
     it 'creates a link' do
-      expect(used_with_namespaces { |xml| helper.link_avatar(xml, account) }).to match '<link rel="avatar" type="" media:width="300" media:height="300" href="http://test.host/assets/avatars/missing.png"/>'
+      expect(used_with_namespaces { |xml| helper.link_avatar(xml, account) }).to match '<link rel="avatar" type="" media:width="300" media:height="300" href="http://test.host/avatars/large/missing.png"/>'
     end
   end