diff options
| author | cedricnjanga | 2017-07-25 16:56:15 +0200 |
|---|---|---|
| committer | cedricnjanga | 2017-07-25 16:56:15 +0200 |
| commit | e64f12e5ca272f3b5107bd05c702d7b12485d9cd (patch) | |
| tree | a2b07166cb3b766edb9f14d6e08f46e384f013b8 /app/controllers/time_tables_controller.rb | |
| parent | c5c6b4f40dcc92d52b47f969a24a73f42de34b66 (diff) | |
| download | chouette-core-e64f12e5ca272f3b5107bd05c702d7b12485d9cd.tar.bz2 | |
Hot fix Timetable#create - from Calendar
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
| -rw-r--r-- | app/controllers/time_tables_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index b0f346c5c..0054963c9 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -35,7 +35,7 @@ class TimeTablesController < ChouetteController def create tt_params = time_table_params - unless tt_params[:calendar_id] && tt_params[:calendar_id] == "" + 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) |
