diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-02-24 12:42:31 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-02-24 13:50:03 -0500 |
commit | 93e6282657b3c8498a9e705c6b4dc153ce6cade5 (patch) | |
tree | 2dc63ed5a3dd9e3508668cc9770ab63a5b6fb3b7 /app | |
parent | 0104ab79b3b6c6d532098bb98dc48f724633310f (diff) | |
download | gitlab-ce-93e6282657b3c8498a9e705c6b4dc153ce6cade5.tar.gz |
Add `:with_avatar` trait to User factory
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index f6e932ff73c..6baf2468ade 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -169,7 +169,7 @@ class User < ActiveRecord::Base validates :avatar_crop_x, :avatar_crop_y, :avatar_crop_size, numericality: { only_integer: true }, presence: true, - if: ->(user) { user.avatar_changed? } + if: ->(user) { user.avatar? } before_validation :generate_password, on: :create before_validation :restricted_signup_domains, on: :create |