Removing default avatars

master
Eugen Rochko 8 years ago
parent 509c18eb13
commit a4cc966476
  1. BIN
      app/assets/images/avatars/missing.png
  2. BIN
      app/assets/images/background-pattern.png
  3. 2
      app/models/account.rb
  4. 2
      spec/helpers/atom_builder_helper_spec.rb

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

@ -7,7 +7,7 @@ class Account < ApplicationRecord
validates :username, presence: true, uniqueness: { scope: :domain, case_sensitive: true }, unless: 'local?' validates :username, presence: true, uniqueness: { scope: :domain, case_sensitive: true }, unless: 'local?'
# Avatar upload # 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/ validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\Z/
# Header upload # Header upload

@ -170,7 +170,7 @@ RSpec.describe AtomBuilderHelper, type: :helper do
let(:account) { Fabricate(:account, username: 'alice') } let(:account) { Fabricate(:account, username: 'alice') }
it 'creates a link' do 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
end end

Loading…
Cancel
Save