aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
diff options
context:
space:
mode:
authorcedricnjanga2017-07-24 17:55:42 +0200
committercedricnjanga2017-07-24 17:55:53 +0200
commit42c984546c996c646f7f59a85a55f529ae696669 (patch)
treefa7d2448c7bbdc18cd69dcdca96f44ba87c0ed23 /app/controllers/time_tables_controller.rb
parentba0b440a1af66d8e5c069c9621dc1c5685b22c4f (diff)
downloadchouette-core-42c984546c996c646f7f59a85a55f529ae696669.tar.bz2
Update Tietable#merge! to manage more edge cases
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 8ece4c8ae..b0f346c5c 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].empty?
+ unless 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)