Skip to content

Commit

Permalink
Make sure that migration 103 does not destroy tag association.
Browse files Browse the repository at this point in the history
  • Loading branch information
Flameeyes committed Mar 2, 2012
1 parent 83d97d0 commit 3f9753c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def self.up
if art.post_type.nil? or art.post_type.empty?
say "Fixing '#{art.title}'", 1
art.post_type = "read"

# this doesn't really belong here but since this migration
# would otherwise reset tags, it's better than nothing.
art.keywords = art.tags.collect(&:name).join(" ")

art.save!
end
end
Expand Down

1 comment on commit 3f9753c

@mvz
Copy link
Member

@mvz mvz commented on 3f9753c Mar 12, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed because the load/save cycle for Article is broken. I've opened bug #65 to fix it.

Please sign in to comment.