From 7bcb93aff46042a8fd229f6c78b3e8bbb4431f5c Mon Sep 17 00:00:00 2001 From: Marc Florisson Date: Wed, 16 May 2012 19:09:58 +0200 Subject: fix redirect_to on after stop_point insert --- app/controllers/stop_points_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/controllers/stop_points_controller.rb') diff --git a/app/controllers/stop_points_controller.rb b/app/controllers/stop_points_controller.rb index bfd229dd7..a6833eb06 100644 --- a/app/controllers/stop_points_controller.rb +++ b/app/controllers/stop_points_controller.rb @@ -11,6 +11,12 @@ class StopPointsController < ChouetteController alias_method :route, :parent + def create + create! do |success, failure| + success.html { redirect_to :action => :index } + end + end + def sort if route.reorder!( params[:stop_point]) flash[:notice] = t("stop_points.reorder_success") @@ -18,7 +24,7 @@ class StopPointsController < ChouetteController flash[:alert] = t("stop_points.reorder_failure") end respond_to do |format| - format.html { redirect_to referential_line_route_stop_points_path(@referential,@line,@route) } + format.html { redirect_to :action => :index } end end -- cgit v1.2.3