This commit is contained in:
albert
2013-03-22 09:17:55 -07:00
parent eae5280091
commit 733fa2dd7b
7 changed files with 12 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ class ForumPost < ActiveRecord::Base
end
def creator_name(name)
where("forum_posts.creator_id = (select _.id from users _ where lower(_.name) = ?)", name.downcase)
where("forum_posts.creator_id = (select _.id from users _ where lower(_.name) = ?)", name.mb_chars.downcase)
end
def active
@@ -50,7 +50,7 @@ class ForumPost < ActiveRecord::Base
end
if params[:creator_name].present?
q = q.creator_name(params[:creator_name])
q = q.creator_name(params[:creator_name].tr(" ", "_"))
end
q