Turn off paper trail for temp

This commit is contained in:
Priit Tark 2015-02-03 12:31:34 +02:00
parent 83fa666fbf
commit c0a0691470

View file

@ -2,10 +2,12 @@ class RefactorRoles < ActiveRecord::Migration
def up
add_column :users, :roles, :string, array: true
User.paper_trail_off!
User.all.each do |x|
x.roles = ['admin']
x.save
end
User.paper_trail_on!
remove_column :users, :role_id