Reputation: 54949
I am trying to check if the user session is not active
<% if user_signed_in?! %>
<div class="homeActions">
<%= link_to "Become a Host", new_host_path, class: "btn btn-lg btn-success" %>
</div>
<% end %>
Upvotes: 2
Views: 3211
Reputation: 9443
You can use
<% if !user_signed_in? %>
or
<% if not user_signed_in? %>
or
<% unless user_signed_in? %>
!
and not
negate the preceding boolean expression, while unless
is the exact opposite of if
.
Upvotes: 8