diff options
author | skv <skv-headless@yandex.ru> | 2014-01-19 22:55:59 +0400 |
---|---|---|
committer | skv <skv-headless@yandex.ru> | 2014-01-19 23:39:56 +0400 |
commit | a3f645ef51ec12ce93934b4ddb11313613d8c451 (patch) | |
tree | f30e76940e436049aa83a8c60741bc6c2d9b7f44 /app/models/user.rb | |
parent | 3fe578a7fdaea8607cf98ffb1878c03fd5ac3649 (diff) | |
download | gitlab-ce-a3f645ef51ec12ce93934b4ddb11313613d8c451.tar.gz |
Remove deprecated finders
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index f2cd554f9c3..fd2bf34e0c3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -238,7 +238,7 @@ class User < ActiveRecord::Base def namespace_uniq namespace_name = self.username - if Namespace.find_by_path(namespace_name) + if Namespace.find_by(path: namespace_name) self.errors.add :username, "already exist" end end @@ -382,7 +382,7 @@ class User < ActiveRecord::Base end def created_by - User.find_by_id(created_by_id) if created_by_id + User.find_by(id: created_by_id) if created_by_id end def sanitize_attrs |