Fix broken migration. OOPS
This commit is contained in:
parent
e2fed6fcef
commit
2d5cddc1b4
|
@ -10,10 +10,8 @@ class AddDescriptionToCategories < ActiveRecord::Migration
|
||||||
|
|
||||||
# Migrate excerpts over
|
# Migrate excerpts over
|
||||||
Category.all.each do |c|
|
Category.all.each do |c|
|
||||||
excerpt = c.excerpt
|
post = c.topic.posts.order(:post_number).first
|
||||||
unless excerpt == I18n.t("category.replace_paragraph")
|
PostRevisor.new(post).send(:update_category_description)
|
||||||
c.update_column(:description, c.excerpt)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue