fix: Validate avatar only when it has changed (#3849)
This commit is contained in:
parent
59deffc7e3
commit
8e6d8e7654
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ module Avatarable
|
|||
|
||||
included do
|
||||
has_one_attached :avatar
|
||||
validate :acceptable_avatar
|
||||
validate :acceptable_avatar, if: -> { avatar.changed? }
|
||||
end
|
||||
|
||||
def avatar_url
|
||||
|
|
Loading…
Reference in a new issue