aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
diff options
context:
space:
mode:
authorLuc Donnet2017-07-13 17:13:12 +0200
committerLuc Donnet2017-07-13 17:13:12 +0200
commitea3ad8d1f9db76e3d2dfc5f96c930af8db074690 (patch)
treebde3f033418d512a80ef28703abb4c021c5a0f06 /app/controllers/time_tables_controller.rb
parent3ef09ffa403dd253c19537bd3d477357d85bfa3d (diff)
parent0a2f9ff965389133fb9656dfb5b222ccfc2b0531 (diff)
downloadchouette-core-ea3ad8d1f9db76e3d2dfc5f96c930af8db074690.tar.bz2
Merge branch 'master' into staging
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])