I am trying to hide the record item info of use on my table if its the use that is login at the moment. Basically I tried to use <% if !current_user.id === user.id %> then he needs to show it.
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Id</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<% if !current_user.id === user.id %>
<tr>
<th scope="row"><%= user.id %></th>
<td><%= user.name %></td>
<td><%= user.email %></td>
<td>
<%= link_to 'Delete', user, method: :delete, data: { confirm: "Are you sure you want to delete user?"}, class: "btn btn-primary btn-user" %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
But this one did not work. How can I hide the information of the user item if he is the one being login?