Change to case-insensitive matching in group @name matching

This commit is contained in:
riking 2014-01-13 16:00:22 -08:00
parent 24e30aff87
commit 0dd317dd74

View File

@ -123,7 +123,7 @@ class Group < ActiveRecord::Base
ALIAS_LEVELS[:members_mods_and_admins]] ALIAS_LEVELS[:members_mods_and_admins]]
end end
Group.where("name LIKE :term_like AND (" + Group.where("name ILIKE :term_like AND (" +
" alias_level in (:levels)" + " alias_level in (:levels)" +
" OR (alias_level = #{ALIAS_LEVELS[:members_mods_and_admins]} AND id in (" + " OR (alias_level = #{ALIAS_LEVELS[:members_mods_and_admins]} AND id in (" +
"SELECT group_id FROM group_users WHERE user_id= :user_id)" + "SELECT group_id FROM group_users WHERE user_id= :user_id)" +