summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-02-26 12:01:56 +0100
committerAzul <azul@leap.se>2013-02-26 12:01:56 +0100
commit2eafc17ea68e75e6b040b6c6677e5eebd3371f0e (patch)
tree14f60e6facd88dc5d218aec14175a59fdf5834ad
parent9c4eb32c22e6bf49d84b6ac1fa4fc5cde5374a7a (diff)
minor: using ?: operator for cert postfix
-rw-r--r--certs/app/models/client_certificate.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/certs/app/models/client_certificate.rb b/certs/app/models/client_certificate.rb
index 3a82d1a..1bc34c6 100644
--- a/certs/app/models/client_certificate.rb
+++ b/certs/app/models/client_certificate.rb
@@ -66,11 +66,8 @@ class ClientCertificate
end
def common_name(for_free_cert = false)
- if for_free_cert
- random_common_name + ' ' + APP_CONFIG[:free_cert_postfix]
- else
- random_common_name
- end
+ random_common_name +
+ (for_free_cert ? APP_CONFIG[:free_cert_postfix] : '')
end
#