mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Mark everyone as admin
This commit is contained in:
parent
3d0271669f
commit
127a4fc28e
1 changed files with 1 additions and 3 deletions
|
@ -3,9 +3,7 @@ class RefactorRoles < ActiveRecord::Migration
|
|||
add_column :users, :roles, :string, array: true
|
||||
|
||||
User.all.each do |x|
|
||||
r = x.role
|
||||
next unless r
|
||||
x.roles = [r.code]
|
||||
x.roles = ['admin']
|
||||
x.save
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue