Add admin panel for users and votes

Closes #2
This commit is contained in:
ricola 2025-06-08 20:46:37 -06:00
parent 9993d04ab0
commit 5fa73da51a
12 changed files with 484 additions and 82 deletions

View file

@ -0,0 +1,5 @@
class AddAdminToUsers < ActiveRecord::Migration[7.2]
def change
add_column :users, :admin, :boolean
end
end

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_06_07_233053) do
ActiveRecord::Schema[7.2].define(version: 2025_06_08_223006) do
create_table "candidates", force: :cascade do |t|
t.integer "vote_id"
t.string "name"
@ -45,6 +45,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_06_07_233053) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "reset"
t.boolean "admin"
end
create_table "votes", force: :cascade do |t|