diff options
Diffstat (limited to 'app/models/key.rb')
-rw-r--r-- | app/models/key.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/key.rb b/app/models/key.rb index 2dcae059c0e..406a1257b5d 100644 --- a/app/models/key.rb +++ b/app/models/key.rb @@ -39,6 +39,11 @@ class Key < ActiveRecord::Base self.key = key.strip unless key.blank? end + def publishable_key + #Removes anything beyond the keytype and key itself + self.key.split[0..1].join(' ') + end + # projects that has this key def projects user.authorized_projects |