aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/networks_controller.rb8
-rw-r--r--app/controllers/referential_networks_controller.rb8
2 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/networks_controller.rb b/app/controllers/networks_controller.rb
index 2e2f3f0d1..d1f83340e 100644
--- a/app/controllers/networks_controller.rb
+++ b/app/controllers/networks_controller.rb
@@ -36,6 +36,14 @@ class NetworksController < BreadcrumbController
if collection.out_of_bounds?
redirect_to params.merge(:page => 1)
end
+
+ @networks = ModelDecorator.decorate(
+ @networks,
+ with: NetworkDecorator,
+ context: {
+ line_referential: line_referential
+ }
+ )
}
build_breadcrumb :index
end
diff --git a/app/controllers/referential_networks_controller.rb b/app/controllers/referential_networks_controller.rb
index 8426c6ba3..e0ce71ce4 100644
--- a/app/controllers/referential_networks_controller.rb
+++ b/app/controllers/referential_networks_controller.rb
@@ -29,6 +29,14 @@ class ReferentialNetworksController < ChouetteController
if collection.out_of_bounds?
redirect_to params.merge(:page => 1)
end
+
+ @networks = ModelDecorator.decorate(
+ @networks,
+ with: ReferentialNetworkDecorator,
+ context: {
+ referential: referential
+ }
+ )
}
build_breadcrumb :index
end