mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-30 20:55:17 +01:00
Merge branch '2.3_branch'
This commit is contained in:
commit
1ba829e960
7 changed files with 241 additions and 75 deletions
|
|
@ -705,9 +705,9 @@ class TodosController < ApplicationController
|
|||
|
||||
def tags
|
||||
# TODO: limit to current_user
|
||||
tags_beginning = Tag.where('name like ?', params[:term]+'%')
|
||||
tags_all = Tag.where('name like ?', '%'+params[:term]+'%')
|
||||
tags_all= tags_all - tags_beginning
|
||||
tags_beginning = Tag.where(Tag.arel_table[:name].matches("#{params[:term]}%"))
|
||||
tags_all = Tag.where(Tag.arel_table[:name].matches("%#{params[:term]}%"))
|
||||
tags_all = tags_all - tags_beginning
|
||||
|
||||
respond_to do |format|
|
||||
format.autocomplete { render :text => for_autocomplete(tags_beginning+tags_all, params[:term]) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue