aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorjpl2017-06-01 11:38:19 +0200
committerjpl2017-06-01 11:38:33 +0200
commit622e19acff68a38361063df1abf8e98152f3d988 (patch)
tree7aa82479c29e2eac4848f38955e968503e3b0d09 /app/controllers
parentc5bf17f9c7fd84a43057c76a4a947abcc6b01621 (diff)
downloadchouette-core-622e19acff68a38361063df1abf8e98152f3d988.tar.bz2
Refs #3638: changing without_tt toggle filter default behaviour
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/vehicle_journeys_controller.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/controllers/vehicle_journeys_controller.rb b/app/controllers/vehicle_journeys_controller.rb
index 6d40d495b..53008c7ce 100644
--- a/app/controllers/vehicle_journeys_controller.rb
+++ b/app/controllers/vehicle_journeys_controller.rb
@@ -117,10 +117,12 @@ class VehicleJourneysController < ChouetteController
end
def maybe_filter_out_journeys_with_time_tables(scope)
- if params[:q] &&
- params[:q][:vehicle_journey_without_time_table] == 'false'
- return scope
- .without_time_tables
+ if params[:q]
+ if params[:q][:vehicle_journey_without_time_table] == 'false'
+ return scope.without_time_tables
+ end
+ else
+ return scope.without_time_tables
end
scope
@@ -135,7 +137,7 @@ class VehicleJourneysController < ChouetteController
def adapted_params
params.tap do |adapted_params|
- adapted_params.merge!( :route => parent)
+ adapted_params.merge!(:route => parent)
hour_entry = "vehicle_journey_at_stops_departure_time_gt(4i)".to_sym
if params[:q] && params[:q][ hour_entry]
adapted_params[:q].merge! hour_entry => (params[:q][ hour_entry].to_i - utc_offset)