Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'develop' of github.com:secret-development/real-box into…

… develop
  • Loading branch information...
commit 50677a2dcc79deaef263ef72145f76b4c31e2675 2 parents 82eef7a + 0c60c20
@lagox lagox authored
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 %>
Please sign in to comment.
Something went wrong with that request. Please try again.