feat(cops): clean rubocop run

1. ignoring one file because it's an intentional vuln
2. made a few small semantic changes, but verified that they're equivalent.
This commit is contained in:
Joseph Mastey
2017-12-06 17:14:25 -06:00
parent 9902345291
commit 6e0a0a8312
11 changed files with 40 additions and 27 deletions
+2 -3
View File
@@ -74,8 +74,7 @@ class User < ApplicationRecord
end
def generate_token(column)
begin
self[column] = Encryption.encrypt_sensitive_value(self.user_id)
end while User.exists?(column => self[column])
self[column] = Encryption.encrypt_sensitive_value(self.user_id)
generate_token(column) if User.exists?(column => self[column])
end
end