Commit ca5a56f

mo <mo@mokhan.ca>
2017-11-24 20:08:27
use ternary operator.
1 parent a2d3d71
Changed files (1)
proof
app
models
proof/app/models/user.rb
@@ -5,11 +5,7 @@ class User < ApplicationRecord
   end
 
   def name_id_for(name_id_format)
-    if Saml::Kit::Namespaces::PERSISTENT == name_id_format
-      uuid
-    else
-      email
-    end
+    Saml::Kit::Namespaces::PERSISTENT == name_id_format ? uuid : email
   end
 
   def assertion_attributes_for(request)