From 6f1fa09dd12979933bef8bb97cdc6ae4ff10a9f0 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 19 Jun 2017 15:58:02 +0200 Subject: RoutingConstraintZones#show: Render header links from #action_links Use the `RoutingConstraintZonesDecorator` to render the header links instead of constructing them in the view. This allows us to reuse the links. To be honest, I haven't actually tested this for real. Don't know how to set up an Interdiction de Traffic Local. Refs #3479 --- app/controllers/routing_constraint_zones_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/routing_constraint_zones_controller.rb b/app/controllers/routing_constraint_zones_controller.rb index 7707427b0..9d2fd712c 100644 --- a/app/controllers/routing_constraint_zones_controller.rb +++ b/app/controllers/routing_constraint_zones_controller.rb @@ -16,6 +16,10 @@ class RoutingConstraintZonesController < ChouetteController def show @routing_constraint_zone = collection.find(params[:id]) + @routing_constraint_zone = @routing_constraint_zone.decorate(context: { + referential: @referential, + line: @line + }) end protected -- cgit v1.2.3