diff options
author | Azul <azul@leap.se> | 2013-11-26 11:22:47 +0100 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-12-06 15:52:11 -0800 |
commit | e64e746759bb241536612c949361442f269ef2f0 (patch) | |
tree | 7d05a83ebfa23df3dbb1b9ceeecbef057c6c1eb2 /users/app/models/identity.rb | |
parent | 015ad90c98c55a078fdfe723d470ad732e807737 (diff) |
ignore attempts to empty public_key, refactor
refactor: prepare validations of the uploaded pgp keys
Diffstat (limited to 'users/app/models/identity.rb')
-rw-r--r-- | users/app/models/identity.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/users/app/models/identity.rb b/users/app/models/identity.rb index 97966d0..cbb540e 100644 --- a/users/app/models/identity.rb +++ b/users/app/models/identity.rb @@ -94,9 +94,9 @@ class Identity < CouchRest::Model::Base read_attribute('keys') || HashWithIndifferentAccess.new end - def set_key(type, value) - return if keys[type] == value - write_attribute('keys', keys.merge(type => value)) + def set_key(type, key) + return if keys[type] == key.to_s + write_attribute('keys', keys.merge(type => key.to_s)) end # for LoginFormatValidation |