summaryrefslogtreecommitdiffstats
path: root/app/models/wiki.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/wiki.rb')
-rw-r--r--app/models/wiki.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index d58212d68..dabe19a4e 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -50,10 +50,10 @@ class Wiki < ActiveRecord::Base
@page_found_with_redirect = false
title = start_page if title.blank?
title = Wiki.titleize(title)
- page = pages.first(:conditions => ["LOWER(title) = LOWER(?)", title])
+ page = pages.where("LOWER(title) = LOWER(?)", title).first
if !page && !(options[:with_redirect] == false)
# search for a redirect
- redirect = redirects.first(:conditions => ["LOWER(title) = LOWER(?)", title])
+ redirect = redirects.where("LOWER(title) = LOWER(?)", title).first
if redirect
page = find_page(redirect.redirects_to, :with_redirect => false)
@page_found_with_redirect = true