Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Comment.find(:all).select {|c| c.body.include?("[...]")}.each do |comment|
- t = Trackback.new(:url => comment.url, :title => comment.author, :excerpt => comment.body)
- t.save
- t.article = comment.article
- t.created_at = comment.created_at
- t.save
- end
- # We're converting an existing blog, so everything in there is ham
- Feedback.find(:all).each { |f| f.mark_as_ham! }
- # Destroy the old comments
- Comment.find(:all).select {|c| c.body.include?("[...]")}.each { |c| c.destroy }
Add Comment
Please, Sign In to add comment