aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/time_tables_controller.rb
diff options
context:
space:
mode:
authorjpl2017-04-27 15:20:33 +0200
committerjpl2017-04-27 15:20:40 +0200
commitd5f329904c74d09c86c77b0ebbe037a6b738ac41 (patch)
tree254eeb7c3b4f2ba3c8fb51a6d45499ffd1098604 /app/controllers/time_tables_controller.rb
parent5cf914aec14e39507a3d7c05834fbd945340be92 (diff)
downloadchouette-core-d5f329904c74d09c86c77b0ebbe037a6b738ac41.tar.bz2
Refs #3185: refacto/upd tt#create
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
-rw-r--r--app/controllers/time_tables_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb
index ea53df35f..3b8e390b6 100644
--- a/app/controllers/time_tables_controller.rb
+++ b/app/controllers/time_tables_controller.rb
@@ -46,7 +46,11 @@ class TimeTablesController < ChouetteController
@time_table.periods << Chouette::TimeTablePeriod.new(period_start: date_range.begin, period_end: date_range.end, position: i)
end
end
- create!
+
+ create! do |success, failure|
+ success.html { redirect_to edit_referential_time_table_path(@referential, @time_table) }
+ failure.html { render :new }
+ end
end
def edit