diff --git a/db/migrate/20101202205446_remove_published_articles.rb b/db/migrate/20101202205446_remove_published_articles.rb index fd8fbb1..9b2d766 100644 --- a/db/migrate/20101202205446_remove_published_articles.rb +++ b/db/migrate/20101202205446_remove_published_articles.rb @@ -1,7 +1,7 @@ class RemovePublishedArticles < ActiveRecord::Migration def self.up select_all("SELECT * from articles WHERE type = 'PublishedArticle'").each do |published| - reference = select('select * from articles where id = %d' % published['reference_article_id']).first + reference = select_one('select * from articles where id = %d' % published['reference_article_id']) if reference execute(ActiveRecord::Base.sanitize_sql(["UPDATE articles SET type = ?, abstract = ?, body = ? WHERE articles.id = ?", reference['type'], reference['abstract'], reference['body'], published['id']])) else -- libgit2 0.21.2