FIX sorting to projectcategory

dev_forge
Jasder 5 years ago
parent 610b22d16f
commit b548be9c8f

@ -0,0 +1,7 @@
class SortToProjectCategoriesWithPosition < ActiveRecord::Migration[5.2]
def change
ProjectCategory.order(:updated_at).each.with_index(1) do |pc, index|
pc.update_column :position, index
end
end
end
Loading…
Cancel
Save