This commit is contained in:
albert
2013-02-23 13:27:18 -05:00
parent 3c1176b077
commit 096f1be22b
4 changed files with 11 additions and 12 deletions

View File

@@ -26,7 +26,7 @@ class WikiPage < ActiveRecord::Base
def search(params = {})
q = scoped
return q if params.blank?
params = {} if params.blank?
if params[:title].present?
q = q.where("title LIKE ? ESCAPE E'\\\\'", params[:title].downcase.tr(" ", "_").to_escaped_for_sql_like)