diff options
author | Azul <azul@leap.se> | 2013-11-26 11:22:47 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-11-26 11:41:01 +0100 |
commit | 7de12c71ce7eb4eeb6e0795275434ed4a4120c25 (patch) | |
tree | 9916fcd11ccf289a9dfcf0f183f7655789464092 /users/app/models/identity.rb | |
parent | 21cc6313320efa2992a58b7434468678ca6cf3b6 (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 |