diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 488edac3..9cf49d00 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -13,6 +13,7 @@ <%= t('users.total_contexts') %> <%= t('users.total_projects') %> <%= t('users.total_notes') %> + <%= User.human_attribute_name('created_at') %>   <% for user in @users %> @@ -26,6 +27,7 @@ <%= h user.contexts.size %> <%= h user.projects.size %> <%= h user.notes.size %> + <%= format_date(user.created_at) %> <%= !user.is_admin? ? remote_delete_user(user) : " ".html_safe %> <% end %> diff --git a/db/migrate/20200807175610_add_dates_to_user.rb b/db/migrate/20200807175610_add_dates_to_user.rb new file mode 100644 index 00000000..9f58dfd2 --- /dev/null +++ b/db/migrate/20200807175610_add_dates_to_user.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 4995cd50..68ea91d1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_07_20_151220) do +ActiveRecord::Schema.define(version: 2020_08_07_175610) do create_table "attachments", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| t.integer "todo_id" @@ -221,6 +221,8 @@ ActiveRecord::Schema.define(version: 2020_07_20_151220) do t.string "remember_token" t.datetime "remember_token_expires_at" t.string "email" + t.datetime "created_at" + t.datetime "updated_at" t.index ["login"], name: "index_users_on_login" end