aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/referentials_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index 9505a47f3..838c46168 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -27,6 +27,14 @@ class ReferentialsController < BreadcrumbController
show! do |format|
@referential = @referential.decorate
@reflines = lines_collection.paginate(page: params[:page], per_page: 10)
+ @reflines = ModelDecorator.decorate(
+ @reflines,
+ with: ReferentialLineDecorator,
+ context: {
+ referential: referential,
+ current_organisation: current_organisation
+ }
+ )
format.json {
render :json => { :lines_count => resource.lines.count,