aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-01-25 16:14:59 +0100
committerZog2018-01-25 17:19:22 +0100
commit988d074946990dc72e41af4d5fa1839fdb39d59e (patch)
treee49d1082d500bef37908cd93200e3a7db52ae114
parentd4674437a48af8d8d388b6e122bf46cc437d12ff (diff)
downloadchouette-core-988d074946990dc72e41af4d5fa1839fdb39d59e.tar.bz2
ImportResources#index: Get rid of `ImportResourceDecorator`
Seems like the object decorator for `ImportResource` isn't needed here. It doesn't contain anything except for an empty `action_links` method, which I'm guessing was to appease the table builder which used to expect one. Get rid of that decorator because it doesn't seem to be needed. Also get rid of the `links` argument to the table builder because we don't need it any more with the new action links interface. Refs #5586
-rw-r--r--app/controllers/import_resources_controller.rb8
-rw-r--r--app/decorators/import_resource_decorator.rb10
-rw-r--r--app/views/import_resources/index.html.slim1
3 files changed, 1 insertions, 18 deletions
diff --git a/app/controllers/import_resources_controller.rb b/app/controllers/import_resources_controller.rb
index c83721310..ea78394a1 100644
--- a/app/controllers/import_resources_controller.rb
+++ b/app/controllers/import_resources_controller.rb
@@ -27,12 +27,6 @@ class ImportResourcesController < ChouetteController
private
def decorate_import_resources(import_resources)
- ImportResourcesDecorator.decorate(
- import_resources,
- with: ImportResourceDecorator,
- context: {
- import: @import
- }
- )
+ ImportResourcesDecorator.decorate(import_resources)
end
end
diff --git a/app/decorators/import_resource_decorator.rb b/app/decorators/import_resource_decorator.rb
deleted file mode 100644
index 9bfd1f757..000000000
--- a/app/decorators/import_resource_decorator.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-class ImportResourceDecorator < Draper::Decorator
- decorates ImportResource
-
- delegate_all
-
- def action_links
- links = []
- end
-
-end
diff --git a/app/views/import_resources/index.html.slim b/app/views/import_resources/index.html.slim
index 0c21a9e09..6b4e60026 100644
--- a/app/views/import_resources/index.html.slim
+++ b/app/views/import_resources/index.html.slim
@@ -43,7 +43,6 @@
end \
), \
],
- links: [],
cls: 'table has-search'
- else
.col-lg-12