Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: secret-development/real-box
base: 4f21ba4b77
...
head fork: secret-development/real-box
compare: df9209e536
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
6 app/helpers/application_helper.rb
@@ -270,5 +270,11 @@ def have_object?(object)
true
end
end
+
+ def isset_last_sign_in(object)
+ if object.nil?
+ "-"
+ end
+ end
end
View
9 app/views/users/index.html.erb
@@ -11,7 +11,14 @@
<% @users.each do |u| %>
<tr>
<td><%= u.lastname %> <%= u.firstname %></td>
- <td><%= to_datetime(u.last_sign_in_at) %></td>
+ <td>
+ <% if isset_last_sign_in(u.last_sign_in_at) %>
+ -
+ <% else %>
+ <%= to_datetime(u.last_sign_in_at) %>
+ <% end %>
+
+ </td>
<td class="actions-buttons">
<%= link_to eye_icon, user_path(u) %>
<% if can? :update, @users %>

No commit comments for this range

Something went wrong with that request. Please try again.