]> source.dussan.org Git - redmine.git/commitdiff
remove unneeded Relation#all from WikiPage#handle_redirects
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 12:43:10 +0000 (12:43 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 12:43:10 +0000 (12:43 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12534 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/wiki_page.rb

index c681147ee323479c64469534d346bb610ea63a0e..86b3fb15d9ba925a7eafa213d7b8b52a74cf825f 100644 (file)
@@ -87,7 +87,7 @@ class WikiPage < ActiveRecord::Base
         r.title == r.redirects_to ? r.destroy : r.save
       end
       # Remove redirects for the new title
-      wiki.redirects.where(:title => title).all.each(&:destroy)
+      wiki.redirects.where(:title => title).each(&:destroy)
       # Create a redirect to the new title
       wiki.redirects << WikiRedirect.new(:title => @previous_title, :redirects_to => title) unless redirect_existing_links == "0"
       @previous_title = nil