aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/referential_lines_controller.rb
diff options
context:
space:
mode:
authorTeddy Wing2017-07-10 11:59:55 +0200
committerTeddy Wing2017-07-12 11:11:14 +0200
commit6920db47172cb5b55f6bdeccb575821cbf3a9f10 (patch)
tree976291a1ddbf4b70e5b819c46a0e41c9d165e09a /app/controllers/referential_lines_controller.rb
parentdf184535c36359921fd5aabfb4c5c3e98c91017d (diff)
downloadchouette-core-6920db47172cb5b55f6bdeccb575821cbf3a9f10.tar.bz2
ReferentialLines#show: Render links from ReferentialLineDecorator
Leverage our newly created `ReferentialLineDecorator` to render the header links, allowing us to use them both here and in the table of lines on the Referentials#show page. Used the extended decoration syntax to allow us to specify the `ReferentialLineDecorator`, otherwise Draper will infer `LineDecorator`, which is not what we want in this case. Refs #3479
Diffstat (limited to 'app/controllers/referential_lines_controller.rb')
-rw-r--r--app/controllers/referential_lines_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/referential_lines_controller.rb b/app/controllers/referential_lines_controller.rb
index fe81bee12..1da64991d 100644
--- a/app/controllers/referential_lines_controller.rb
+++ b/app/controllers/referential_lines_controller.rb
@@ -37,6 +37,14 @@ class ReferentialLinesController < ChouetteController
)
show! do
+ @line = ReferentialLineDecorator.decorate(
+ @line,
+ context: {
+ referential: referential,
+ current_organisation: current_organisation
+ }
+ )
+
build_breadcrumb :show
end
end