aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorBruno Perles2015-10-28 11:35:08 +0100
committerBruno Perles2015-10-28 11:35:08 +0100
commit5b4136b2907ffc918210495d8f9a29c1e7d681fb (patch)
tree6b73ff915c90d450572f5eb9599d3bc0d8938678 /app/controllers
parent843bec92850de6f4b46498611842f894a78e7d3d (diff)
downloadchouette-core-5b4136b2907ffc918210495d8f9a29c1e7d681fb.tar.bz2
Merge Timeband feature and revert Gemfile
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/timebands_controller.rb20
-rw-r--r--app/controllers/vehicle_journeys_controller.rb2
2 files changed, 21 insertions, 1 deletions
diff --git a/app/controllers/timebands_controller.rb b/app/controllers/timebands_controller.rb
new file mode 100644
index 000000000..446255cac
--- /dev/null
+++ b/app/controllers/timebands_controller.rb
@@ -0,0 +1,20 @@
+class TimebandsController < ChouetteController
+
+ defaults :resource_class => Chouette::Timeband
+
+ respond_to :html
+
+ belongs_to :referential
+
+ def new
+ new! do
+ build_breadcrumb :new
+ end
+ end
+
+ private
+
+ def timeband_params
+ params.require(:timeband).permit( :name, :start_time, :end_time )
+ end
+end
diff --git a/app/controllers/vehicle_journeys_controller.rb b/app/controllers/vehicle_journeys_controller.rb
index bac4166a5..2c2a533aa 100644
--- a/app/controllers/vehicle_journeys_controller.rb
+++ b/app/controllers/vehicle_journeys_controller.rb
@@ -97,7 +97,7 @@ class VehicleJourneysController < ChouetteController
:stop_point_id,
:departure_time,
:is_frequency] },
- { frequencies_attributes: [ :scheduled_headway_interval, :first_departure_time,
+ { journey_frequencies_attributes: [ :scheduled_headway_interval, :first_departure_time,
:last_departure_time,
:exact_time ] } )
end