aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
diff options
context:
space:
mode:
authorZog2018-02-02 13:08:51 +0100
committerZog2018-02-02 13:08:51 +0100
commita192d4736028b535a1030c0f506597845a3bc4a4 (patch)
tree57855ee98f7905dd54543a776ae6d0b0651244bc /app/controllers/time_tables_controller.rb
parent9f30b2debe7ece403d9e588df9763c119436d967 (diff)
downloadchouette-core-a192d4736028b535a1030c0f506597845a3bc4a4.tar.bz2
Refs #5835; Timetables inherit application days from calendars5835-fix-timetable-creation
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
-rw-r--r--app/controllers/time_tables_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb
index 0707b9648..0dcadad1e 100644
--- a/app/controllers/time_tables_controller.rb
+++ b/app/controllers/time_tables_controller.rb
@@ -36,7 +36,6 @@ class TimeTablesController < ChouetteController
def create
tt_params = time_table_params
if tt_params[:calendar_id] && tt_params[:calendar_id] != ""
- %i(monday tuesday wednesday thursday friday saturday sunday).map { |d| tt_params[d] = true }
calendar = Calendar.find(tt_params[:calendar_id])
tt_params[:calendar_id] = nil if tt_params.has_key?(:dates_attributes) || tt_params.has_key?(:periods_attributes)
end
@@ -45,6 +44,7 @@ class TimeTablesController < ChouetteController
@time_table = created_from ? created_from.duplicate : Chouette::TimeTable.new(tt_params)
if calendar
+ @time_table.int_day_types = calendar.int_day_types
calendar.dates.each_with_index do |date, i|
@time_table.dates << Chouette::TimeTableDate.new(date: date, position: i, in_out: true)
end