fixes to model searches

This commit is contained in:
albert
2013-02-19 12:27:17 -05:00
parent e678427ee7
commit e0fdda3103
21 changed files with 68 additions and 68 deletions

View File

@@ -25,11 +25,11 @@ class ForumTopic < ActiveRecord::Base
q = scoped
return q if params.blank?
if params[:title_matches]
if params[:title_matches].present?
q = q.title_matches(params[:title_matches])
end
if params[:title]
if params[:title].present?
q = q.where("title = ?", params[:title])
end