aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/autocomplete_timebands_controller.rb
diff options
context:
space:
mode:
authorZog2018-05-29 10:18:16 +0200
committerJohan Van Ryseghem2018-05-30 16:29:33 +0200
commit3e8d95ac8168205ac9526fb8663459d691d09c30 (patch)
treefd2bc220473f4defe30a35668d6b9eead76f00fa /app/controllers/autocomplete_timebands_controller.rb
parent971b267958c3bf78abea332e0af4c46a23679b61 (diff)
downloadchouette-core-3e8d95ac8168205ac9526fb8663459d691d09c30.tar.bz2
Refs #6433; Fix specs
Diffstat (limited to 'app/controllers/autocomplete_timebands_controller.rb')
-rw-r--r--app/controllers/autocomplete_timebands_controller.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/app/controllers/autocomplete_timebands_controller.rb b/app/controllers/autocomplete_timebands_controller.rb
deleted file mode 100644
index af041c33e..000000000
--- a/app/controllers/autocomplete_timebands_controller.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-class AutocompleteTimebandsController < ChouetteController
- respond_to :json, :only => [:index]
-
- include ReferentialSupport
-
- protected
-
- def select_timebands
- if params[:route_id]
- referential.timebands.joins( vehicle_journeys: :route).where( "routes.id IN (#{params[:route_id]})")
- else
- referential.timebands
- end
- end
-
- def referential_timebands
- @referential_timebands ||= select_timebands
- end
-
- def collection
- @timebands = referential_timebands.select{ |p| p.fullname =~ /#{params[:q]}/i }
- end
-end