From 74da5aa9fdfa792cfbef2fcfc23c35d9a0b19408 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Wed, 12 Jul 2017 10:01:47 +0200 Subject: #4015 adjust Tag filter to be strict --- app/controllers/time_tables_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/time_tables_controller.rb') diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index f23e4c201..0b3d704ee 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -117,7 +117,7 @@ class TimeTablesController < ChouetteController end def tags - @tags = ActsAsTaggableOn::Tag.where("tags.name LIKE ?", "%#{params[:tag]}%") + @tags = ActsAsTaggableOn::Tag.where("tags.name = ?", "%#{params[:tag]}%") respond_to do |format| format.json { render :json => @tags.map{|t| {:id => t.id, :name => t.name }} } end -- cgit v1.2.3 From bc33eba0f1129a491a56bc9b616f388477489b0b Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Wed, 12 Jul 2017 16:48:27 +0200 Subject: Remove wild option in timetable tag filter --- app/controllers/time_tables_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/time_tables_controller.rb') diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index 0b3d704ee..20d500ea9 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -130,7 +130,7 @@ class TimeTablesController < ChouetteController if params[:q] && params[:q]["tag_search"] tags = params[:q]["tag_search"].reject {|c| c.empty?} params[:q].delete("tag_search") - scope = select_time_tables.tagged_with(tags, :wild => true, :any => true) if tags.any? + scope = select_time_tables.tagged_with(tags, :any => true) if tags.any? end scope = ransack_periode(scope) @q = scope.search(params[:q]) -- cgit v1.2.3