We werent using any of the other avatar methods

This commit is contained in:
David Heinemeier Hansson
2025-04-22 21:20:18 +02:00
parent 134333ae44
commit 6cd8d54bf7
2 changed files with 2 additions and 18 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
class User < ApplicationRecord
include Accessor, Assignee, Avatar, Role, Transferable
include Accessor, Assignee, Role, Transferable
has_many :sessions, dependent: :destroy
has_secure_password validations: false
has_one_attached :avatar
has_many :comments, inverse_of: :creator, dependent: :destroy
-17
View File
@@ -1,17 +0,0 @@
module User::Avatar
extend ActiveSupport::Concern
included do
has_one_attached :avatar
end
class_methods do
def from_avatar_token(sid)
find_signed!(sid, purpose: :avatar)
end
end
def avatar_token
signed_id(purpose: :avatar)
end
end