aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
-rw-r--r--app/controllers/time_tables_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb
index f23e4c201..20d500ea9 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
@@ -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])