From bf37e97d8a86814b1bc2f844cbcff86ab0a43266 Mon Sep 17 00:00:00 2001 From: Michel Etienne Date: Fri, 3 Oct 2014 14:37:12 +0200 Subject: duplicate calendar will open new form and not edit form , Mantis 29110 --- app/controllers/time_tables_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/controllers/time_tables_controller.rb') diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index 54b0a3bac..be1738060 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -46,10 +46,10 @@ class TimeTablesController < ChouetteController def duplicate @time_table = Chouette::TimeTable.find params[:id] + # prepare breadcrumb before prepare data for new timetable + build_breadcrumb :edit @time_table = @time_table.duplicate - @time_table.save - flash[:notice] = I18n.translate("time_tables.duplicate_success") - redirect_to edit_referential_time_table_path(@referential, @time_table) + render :new end def tags -- cgit v1.2.3