make tag autocomplete endpoint expiry dynamic
This commit is contained in:
@@ -19,7 +19,7 @@ class TagsController < ApplicationController
|
|||||||
|
|
||||||
def autocomplete
|
def autocomplete
|
||||||
@tags = Tag.names_matches_with_aliases(params[:search][:name_matches])
|
@tags = Tag.names_matches_with_aliases(params[:search][:name_matches])
|
||||||
expires_in 7.days
|
expires_in params[:expiry].to_i.days if params[:expiry]
|
||||||
|
|
||||||
respond_with(@tags) do |format|
|
respond_with(@tags) do |format|
|
||||||
format.xml do
|
format.xml do
|
||||||
|
|||||||
Reference in New Issue
Block a user