Display all ratings for a vote

This commit is contained in:
ricola 2025-04-06 17:04:31 -06:00
parent 5096134d2e
commit 46c8745a9e
3 changed files with 40 additions and 19 deletions

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2025_03_21_235135) do
ActiveRecord::Schema[7.2].define(version: 2025_03_22_172051) do
create_table "candidates", force: :cascade do |t|
t.integer "vote_id"
t.string "name"
@ -26,8 +26,10 @@ ActiveRecord::Schema[7.2].define(version: 2025_03_21_235135) do
t.integer "value"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "vote_id", null: false
t.index ["candidate_id"], name: "index_ratings_on_candidate_id"
t.index ["user_id"], name: "index_ratings_on_user_id"
t.index ["vote_id"], name: "index_ratings_on_vote_id"
end
create_table "users", force: :cascade do |t|
@ -45,4 +47,6 @@ ActiveRecord::Schema[7.2].define(version: 2025_03_21_235135) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_foreign_key "ratings", "votes"
end