Move related list partial to a component

This way the code is easier to follow; the code checking whether the
list has contents is in the partial rendering the list.

We also remove some duplication setting up related content in the
controllers.

For some reason, we have to manually ignore i18n keys which were
automatically ignored when the code was in the view.
This commit is contained in:
Javi Martín
2021-08-03 22:32:15 +02:00
parent 89436b528f
commit c8d8fae98d
12 changed files with 62 additions and 51 deletions

View File

@@ -26,7 +26,6 @@ class DashboardController < Dashboard::BaseController
end
def related_content
@related_contents = Kaminari.paginate_array(proposal.relationed_contents).page(params[:page]).per(5)
end
private