Commit 707a3093f6b470f10a71c7cc295e057e4ef31cb5

Authored by Victor Costa
1 parent 642c42c1

Add a migration to fix proposals categories

db/migrate/20151221105330_add_categories_proposal.rb 0 → 100644
... ... @@ -0,0 +1,13 @@
  1 +class AddCategoriesProposal < ActiveRecord::Migration
  2 +
  3 + def self.up
  4 + ProposalsDiscussionPlugin::Proposal.find_each do |proposal|
  5 + proposal.inherit_parent_categories
  6 + end
  7 + end
  8 +
  9 + def self.down
  10 + puts "Warning: cannot restore original categories"
  11 + end
  12 +
  13 +end
... ...