Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (8 sloc) 240 Bytes
# frozen_string_literal: true
class Player < ApplicationRecord
attribute :player_picture, :string, default: ''
has_one_attached :picture
def has_picture?
File.exist?(ActiveStorage::Blob.service.path_for(picture.key))
end
end
You can’t perform that action at this time.