aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Florisson2012-05-16 19:09:58 +0200
committerMarc Florisson2012-05-16 19:09:58 +0200
commit7bcb93aff46042a8fd229f6c78b3e8bbb4431f5c (patch)
tree98d326603c07add4d4ef05d242b1b65f866cb888
parent8dd0e3ae02e8c90f3c18224ce0d3dc960bd4b0dc (diff)
downloadchouette-core-7bcb93aff46042a8fd229f6c78b3e8bbb4431f5c.tar.bz2
fix redirect_to on after stop_point insert
-rw-r--r--app/controllers/stop_points_controller.rb8
1 files changed, 7 insertions, 1 deletions
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