Show author names in problem and translation views

This commit is contained in:
pfischbeck committed 2019-02-05 12:00:25 +01:00
1 parent ddb1cfac33
commit 89a8fbba99
14 files changed
+69 -7

No files matched your search

@@ -0,0 +1,5 @@
class AddAuthorToTranslations < ActiveRecord::Migration[5.2]
def change
add_reference :translations, :author, index: true, null: true, foreign_key: {to_table: :users}
end
end
+3 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_02_03_164629) do
ActiveRecord::Schema.define(version: 2019_02_04_164033) do
create_table "problems", force: :cascade do |t|
t.datetime "created_at"
@@ -26,6 +26,8 @@ ActiveRecord::Schema.define(version: 2019_02_03_164629) do
t.datetime "updated_at"
t.integer "problem_id"
t.integer "status", default: 0
t.integer "author_id"
t.index ["author_id"], name: "index_translations_on_author_id"
t.index ["problem_id"], name: "index_translations_on_problem_id"
end