Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-26 16:11:45 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-26 16:11:45 +0400
commit98ba075c327c20f84bb465907ff1d954538e0e39 (patch)
tree57d51d81209c14dc8cb4307aedeed2b40ed99949 /app/models/email.rb
parent3a21c904dda9aa9c701675ccc6d1c15b20a745b3 (diff)
User model to strong params. Comment other attr_accessible to let tests run
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/email.rb')
-rw-r--r--app/models/email.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/app/models/email.rb b/app/models/email.rb
index 9068c2b87b6..57f476bd519 100644
--- a/app/models/email.rb
+++ b/app/models/email.rb
@@ -10,16 +10,8 @@
#
class Email < ActiveRecord::Base
- attr_accessible :email, :user_id
-
- #
- # Relations
- #
belongs_to :user
- #
- # Validations
- #
validates :user_id, presence: true
validates :email, presence: true, email: { strict_mode: true }, uniqueness: true
validate :unique_email, if: ->(email) { email.email_changed? }