From bf9e5123a9cc238f9a1abbbd2a9f80b539b87a73 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Wed, 23 May 2018 12:57:13 -0700 Subject: [PATCH] make tag autocomplete endpoint expiry dynamic --- app/controllers/tags_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 461fd9ba0..efe5d7cdb 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -19,7 +19,7 @@ class TagsController < ApplicationController def autocomplete @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| format.xml do