add roles to admin panel
This commit is contained in:
8
db/migrate/20220721133421_create_join_table_user_role.rb
Normal file
8
db/migrate/20220721133421_create_join_table_user_role.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class CreateJoinTableUserRole < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_join_table(:users, :roles, unique: true) do |t|
|
||||
t.index(%i[user_id role_id])
|
||||
t.index(%i[role_id user_id])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user