aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/vehicle_journeys_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/vehicle_journeys_controller.rb')
-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)