Upload user avatar

This commit is contained in:
Jason Zimdars
2024-12-18 14:44:05 -06:00
parent b323cd4e4c
commit 295d8ce088
5 changed files with 33 additions and 6 deletions
+17
View File
@@ -0,0 +1,17 @@
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