add match history
This commit is contained in:
@@ -22,6 +22,13 @@ class User < ApplicationRecord
|
||||
.order(finished_at: :desc)
|
||||
end
|
||||
|
||||
def avatar_url
|
||||
return nil unless avatar.attached?
|
||||
|
||||
options = Rails.application.routes.default_url_options.presence || { host: "localhost", port: 3000 }
|
||||
Rails.application.routes.url_helpers.rails_blob_url(avatar, options)
|
||||
end
|
||||
|
||||
private
|
||||
def avatar_content_type
|
||||
unless avatar.blob.content_type.in?(%w[image/png image/jpeg image/gif image/webp])
|
||||
|
||||
Reference in New Issue
Block a user