Skip to content

Commit 90db321

Browse files
committed
added users/sessions/_sign_out partial for rendering sign out buttons
1 parent 56b350b commit 90db321

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<%#
2+
"Renders a sign out button depending on what sign in method is enabled (Devise or SAML)
3+
4+
Variables:
5+
? is_danger : whether the button should be rended as a dangerous action
6+
"%>
7+
8+
<%
9+
is_danger = defined?(is_danger) ? is_danger : false
10+
%>
11+
12+
<%= link_to 'Sign Out',
13+
devise_sign_in_enabled? ? destroy_user_session_path : destroy_saml_user_session_path,
14+
class: "button #{is_danger ? 'is-outlined is-danger' : 'is-muted'}",
15+
method: :delete,
16+
role: 'button' %>

0 commit comments

Comments
 (0)