diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-08 05:09:05 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-08 05:09:05 +0000 |
commit | 2977f95ad9acfce2eebbeb9821a1fa1f1d6b1e89 (patch) | |
tree | c2a4d67d8ea66d9fa8b080fc8789e7360968fef8 /app/models/wiki_page.rb | |
parent | 035c68f1a9d91f1eacfaa5918021cf40bb56633c (diff) | |
download | redmine-2977f95ad9acfce2eebbeb9821a1fa1f1d6b1e89.tar.gz redmine-2977f95ad9acfce2eebbeb9821a1fa1f1d6b1e89.zip |
Rails4: replace deprecated find_all_by_* at WikiPage model
git-svn-id: http://svn.redmine.org/redmine/trunk@12515 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r-- | app/models/wiki_page.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index db723ecb5..096cf4ec5 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -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.find_all_by_title(title).each(&:destroy) + wiki.redirects.where(:title => title).all.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 |