diff options
| author | Michel Etienne | 2014-12-12 14:04:07 +0100 |
|---|---|---|
| committer | Michel Etienne | 2014-12-12 14:04:07 +0100 |
| commit | 0f0a9844f579b807fa2a01ebd357bfba75c0e7c6 (patch) | |
| tree | a654215ad59871adec7adfe2f5d8bac2dd50770e /app/controllers/routes_controller.rb | |
| parent | 07bac1b8ce8bf6380cd9bfc07ad174e3a88fcfd2 (diff) | |
| parent | a0433013264531e825268d0ae1a0da873d368313 (diff) | |
| download | chouette-core-0f0a9844f579b807fa2a01ebd357bfba75c0e7c6.tar.bz2 | |
Merge branch 'V2_5' of github.com:afimb/chouette2 into V2_5
Diffstat (limited to 'app/controllers/routes_controller.rb')
| -rw-r--r-- | app/controllers/routes_controller.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb index 391a14d88..6454ce068 100644 --- a/app/controllers/routes_controller.rb +++ b/app/controllers/routes_controller.rb @@ -15,6 +15,21 @@ class RoutesController < ChouetteController end end + def edit_boarding_alighting + @route = route + build_breadcrumb :edit + end + + def save_boarding_alighting + @route = route + + if @route.update_attributes(params[:route]) + redirect_to referential_line_route_path(@referential, @line, @route) + else + render "edit_boarding_alighting" + end + end + def show @map = RouteMap.new(route).with_helpers(self) @stop_points = route.stop_points.paginate(:page => params[:page]) @@ -26,7 +41,7 @@ class RoutesController < ChouetteController # overwrite inherited resources to use delete instead of destroy # foreign keys will propagate deletion) def destroy_resource(object) - object.delete + object.delete end def destroy |
