This commit is contained in:
albert
2013-03-05 20:02:35 -05:00
parent b5099d737d
commit 3addb4f02a

View File

@@ -86,7 +86,7 @@ class User < ActiveRecord::Base
end end
def find_by_name(name) def find_by_name(name)
where(["lower(name) = ?", name.downcase]).first where("lower(name) = ?", name.downcase.tr(" ", "_")).first
end end
def id_to_pretty_name(user_id) def id_to_pretty_name(user_id)