aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
diff options
context:
space:
mode:
authorcedricnjanga2017-07-19 11:57:23 +0200
committercedricnjanga2017-07-19 11:57:23 +0200
commit144e75edb237e94313bb9e1fc69c47781e72bd74 (patch)
treea44fa5f50c8896c52831bc1ae1186742a3db68c2 /app/controllers/time_tables_controller.rb
parent4d6dc16a98aea55f89a3ae3fe5360fa182f62fac (diff)
downloadchouette-core-144e75edb237e94313bb9e1fc69c47781e72bd74.tar.bz2
Refs 4131 Change Timetable#create to fetch all Calendars (new_from)
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 20d500ea9..b7fb2bf9b 100644
--- a/app/controllers/time_tables_controller.rb
+++ b/app/controllers/time_tables_controller.rb
@@ -37,7 +37,7 @@ class TimeTablesController < ChouetteController
tt_params = time_table_params
if tt_params[:calendar_id]
%i(monday tuesday wednesday thursday friday saturday sunday).map { |d| tt_params[d] = true }
- calendar = current_organisation.calendars.find_by_id(tt_params[:calendar_id])
+ 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