diff options
author | Rémy Coutable <remy@rymai.me> | 2016-03-15 13:20:54 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-03-15 14:55:40 +0100 |
commit | 1714883107b7b8b8f2ef8c2836acc2866362738e (patch) | |
tree | 4c79d81c52b932c20d0ddfb467175f39e281faf3 /app/models | |
parent | ea7d062fa60e3e622288237fc66a815348bbcf36 (diff) | |
download | gitlab-ce-1714883107b7b8b8f2ef8c2836acc2866362738e.tar.gz |
Revert "Merge branch 'avatar-cropping' into 'master'
"revert-avatar-cropping
This reverts commit 01160fc06182de89c400af174861f6545ad6ceb8, reversing
changes made to 4bff9daf8b6d85e9c78565e21cfaa3f6d36f0282.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 8871b0ab9fa..68b242888aa 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -98,9 +98,6 @@ class User < ActiveRecord::Base # Virtual attribute for authenticating by either username or email attr_accessor :login - # Virtual attributes to define avatar cropping - attr_accessor :avatar_crop_x, :avatar_crop_y, :avatar_crop_size - # # Relations # @@ -166,11 +163,6 @@ class User < ActiveRecord::Base validate :owns_public_email, if: ->(user) { user.public_email_changed? } validates :avatar, file_size: { maximum: 200.kilobytes.to_i } - validates :avatar_crop_x, :avatar_crop_y, :avatar_crop_size, - numericality: { only_integer: true }, - presence: true, - if: ->(user) { user.avatar? && user.avatar_changed? } - before_validation :generate_password, on: :create before_validation :restricted_signup_domains, on: :create before_validation :sanitize_attrs |