Mercurial > hg > soundsoftware-site
diff plugins/redmine_bibliography/app/controllers/publications_controller.rb @ 1443:ea2a09a0fd90 cannam
Merge from luisf branch
author | Chris Cannam |
---|---|
date | Fri, 11 Oct 2013 16:42:44 +0100 |
parents | 8d721cac2925 |
children |
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/controllers/publications_controller.rb Fri Oct 11 09:24:18 2013 +0100 +++ b/plugins/redmine_bibliography/app/controllers/publications_controller.rb Fri Oct 11 16:42:44 2013 +0100 @@ -203,7 +203,8 @@ # todo: make sure query works with both pgres and mysql ~lf.20131010 authors_list = Author.joins(:authorships).where("LOWER(authorships.name_on_paper) LIKE LOWER(?)", "%#{params[:term]}%").uniq - users_list = User.active.like(params[:term]).find(:all, :limit => 100) + # name_like scope, defined in lib/user_author patch + users_list = User.active.name_like(params[:term]).find(:all, :limit => 100) logger.debug "Query for \"#{params[:term]}\" returned \"#{authors_list.size}\" authors and \"#{users_list.size}\" users"