mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Crop profile images
This commit is contained in:
@@ -14,7 +14,7 @@ class User < ApplicationRecord
|
||||
enum :role, { member: "member", admin: "admin" }, validate: true
|
||||
|
||||
has_one_attached :profile_image do |attachable|
|
||||
attachable.variant :thumbnail, resize_to_limit: [ 150, 150 ], preprocessed: true
|
||||
attachable.variant :thumbnail, resize_to_fill: [ 300, 300 ]
|
||||
end
|
||||
|
||||
validate :profile_image_size
|
||||
|
||||
Reference in New Issue
Block a user