Last active
June 5, 2018 08:12
-
-
Save maulayyacyber/3a7a367d0825f2689513875925a07f66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% @users.each_with_index do |data, index| %> | |
<tr> | |
<td style="text-align: center;"> | |
<% if params[:page].to_i >=1 %> | |
<%= (params[:page].to_i - 1) * 10 + (index + 1) %> | |
<% else %> | |
<%= index + 1 %> | |
<% end %> | |
</td> | |
<td><%= data.full_name %></td> | |
<td><%= data.email_address %></td> | |
<td><%= time_ago_in_words(data.created_at) %></td> | |
<td style="text-align: center;"> | |
<%= link_to '<i class="fa fa-list-ul"></i> Detail'.html_safe, user_user_path(data), class: "btn btn-success btn-sm" %> | |
<%= link_to '<i class="fa fa-trash"></i> Destroy'.html_safe, user_user_path(data), method: :delete, class: "btn btn-danger btn-sm", remote: true, data: { confirm: "Are u sure?" } %> | |
</td> | |
</tr> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment