From 634cf4ee06a4820eaa2431a272b9a223118cf884 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 11 Nov 2024 21:09:06 +0000 Subject: Adds is_admin to the User model and ensures only admin users can add new resource --- db/migrate/20241111204736_add_is_admin_to_user.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20241111204736_add_is_admin_to_user.rb (limited to 'db/migrate/20241111204736_add_is_admin_to_user.rb') diff --git a/db/migrate/20241111204736_add_is_admin_to_user.rb b/db/migrate/20241111204736_add_is_admin_to_user.rb new file mode 100644 index 0000000..a055513 --- /dev/null +++ b/db/migrate/20241111204736_add_is_admin_to_user.rb @@ -0,0 +1,5 @@ +class AddIsAdminToUser < ActiveRecord::Migration[8.0] + def change + add_column :users, :is_admin, :boolean, default: false + end +end -- cgit v1.2.3