mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 07:10:12 +01:00
#2448: Add created_at and updated_at fields to the user model and display the creation date in user list
This commit is contained in:
parent
15f7510cba
commit
8369bf9e96
2 changed files with 8 additions and 0 deletions
|
|
@ -13,6 +13,7 @@
|
|||
<th><%= t('users.total_contexts') %></th>
|
||||
<th><%= t('users.total_projects') %></th>
|
||||
<th><%= t('users.total_notes') %></th>
|
||||
<th><%= User.human_attribute_name('created_at') %></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
<% for user in @users %>
|
||||
|
|
@ -26,6 +27,7 @@
|
|||
<td><%= h user.contexts.size %></td>
|
||||
<td><%= h user.projects.size %></td>
|
||||
<td><%= h user.notes.size %></td>
|
||||
<td><%= format_date(user.created_at) %></td>
|
||||
<td><%= !user.is_admin? ? remote_delete_user(user) : " ".html_safe %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
|||
6
db/migrate/20200807175610_add_dates_to_user.rb
Normal file
6
db/migrate/20200807175610_add_dates_to_user.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class AddDatesToUser < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :created_at, :datetime
|
||||
add_column :users, :updated_at, :datetime
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue