diff options
| author | Teddy Wing | 2017-08-07 16:51:19 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-08-07 16:51:19 +0200 |
| commit | 0b79907ea95a1f2fa9c8766474773f6555f49f37 (patch) | |
| tree | 4a784c303e752060e56d7bb9085469bc1f35d9ef /app | |
| parent | 1d490afb5b616f15837259d093d458357f17a439 (diff) | |
| download | chouette-core-0b79907ea95a1f2fa9c8766474773f6555f49f37.tar.bz2 | |
RoutesController: Add separate method for POST /duplicate
Send POST requests for duplication to a new controller method so we can
more easily handle them and separate setup and creation code.
Note that the test doesn't work. The `to change` part succeeds even
though it shouldn't. Still need to figure out what's going on there, but
committing this to hand off the feature to Robert.
Refs #4189
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/routes_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb index 852477c5c..e20ae9d14 100644 --- a/app/controllers/routes_controller.rb +++ b/app/controllers/routes_controller.rb @@ -75,6 +75,10 @@ class RoutesController < ChouetteController build_breadcrumb(:edit) end + def post_duplicate + @route = Chouette::Route.find(params[:id]) + end + protected alias_method :route, :resource |
