We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent caa9b4f commit c80cf7aCopy full SHA for c80cf7a
app/models/user.rb
@@ -42,7 +42,11 @@ def token=(value)
42
end
43
44
def token
45
- crypt.decrypt_and_verify(self[:token]) if self[:token]
+ encrypted_token = self[:token]
46
+
47
+ unless encrypted_token.nil?
48
+ crypt.decrypt_and_verify(encrypted_token)
49
+ end
50
51
52
def payment_gateway_subscription
app/models/violation.rb
@@ -20,7 +20,11 @@ def source=(value)
20
21
22
def source
23
- crypt.decrypt_and_verify(self[:source]) if self[:source]
+ encrypted_source = self[:source]
24
25
+ unless encrypted_source.nil?
26
+ crypt.decrypt_and_verify(encrypted_source)
27
28
29
30
private
0 commit comments