Revision 1441:8d721cac2925 plugins/redmine_bibliography/app/controllers
| plugins/redmine_bibliography/app/controllers/publications_controller.rb | ||
|---|---|---|
| 203 | 203 |
# todo: make sure query works with both pgres and mysql ~lf.20131010 |
| 204 | 204 |
authors_list = Author.joins(:authorships).where("LOWER(authorships.name_on_paper) LIKE LOWER(?)", "%#{params[:term]}%").uniq
|
| 205 | 205 |
|
| 206 |
users_list = User.active.like(params[:term]).find(:all, :limit => 100) |
|
| 206 |
# name_like scope, defined in lib/user_author patch |
|
| 207 |
users_list = User.active.name_like(params[:term]).find(:all, :limit => 100) |
|
| 207 | 208 |
|
| 208 | 209 |
logger.debug "Query for \"#{params[:term]}\" returned \"#{authors_list.size}\" authors and \"#{users_list.size}\" users"
|
| 209 | 210 |
|
Also available in: Unified diff