Commit b98b063

mo <mo@mokhan.ca>
2017-11-24 20:08:27
use ternary operator.
1 parent d155c64
Changed files (1)
app
models
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)