logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: a4cc966476852542f445793b60c67ad3682976e5
parent: 509c18eb139ead0d2e2f02f580ef04b28d874f48
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Thu,  8 Sep 2016 18:23:59 +0200

Removing default avatars

Diffstat:

Dapp/assets/images/avatars/missing.png0
Dapp/assets/images/background-pattern.png0
Mapp/models/account.rb2+-
Mspec/helpers/atom_builder_helper_spec.rb2+-
4 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/assets/images/avatars/missing.png b/app/assets/images/avatars/missing.png Binary files differ. diff --git a/app/assets/images/background-pattern.png b/app/assets/images/background-pattern.png Binary files differ. diff --git a/app/models/account.rb b/app/models/account.rb @@ -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 diff --git a/spec/helpers/atom_builder_helper_spec.rb b/spec/helpers/atom_builder_helper_spec.rb @@ -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