diff --git a/lib/tasks/update_wiki_article_slugs.rake b/lib/tasks/update_wiki_article_slugs.rake index b733e531..82901b7d 100644 --- a/lib/tasks/update_wiki_article_slugs.rake +++ b/lib/tasks/update_wiki_article_slugs.rake @@ -1,7 +1,7 @@ desc "Upgrade wiki articles slugs from + to - for spaces" task :update_wiki_article_slugs => :environment do user = User.find_by_username("mitsiee") - user = User.find_by_username("admin") unless @user.present? + user = User.find_by_username("admin") unless user.present? articles_ids = Wiki::Article.group(:group_id).maximum(:id).values articles = Wiki::Article.where(id: articles_ids) diff --git a/lib/tasks/upgrade_wiki_articles.rake b/lib/tasks/upgrade_wiki_articles.rake index b8f3f6a1..8c720071 100644 --- a/lib/tasks/upgrade_wiki_articles.rake +++ b/lib/tasks/upgrade_wiki_articles.rake @@ -5,7 +5,7 @@ task :upgrade_wiki_articles => :environment do defaults = YAML.safe_load(File.read(Rails.root.join("config/arrays/wiki", "defaults.yml"))) user = User.find_by_username("mitsiee") - user = User.find_by_username("admin") unless @user.present? + user = User.find_by_username("admin") unless user.present? (actions + values).each do |current| article = Wiki::Article.where(title: current["en-US"]).last