aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-01-25 16:14:59 +0100
committerTeddy Wing2018-01-25 16:14:59 +0100
commit730b1fa64565f6879d70ea5f5140e833b6ac72c4 (patch)
tree449e83f4f292a3c0758ff45cf44e5a75aea59114
parentbd9cd955e7855d7f8fc9f369e47d50f3a8ba718d (diff)
downloadchouette-core-730b1fa64565f6879d70ea5f5140e833b6ac72c4.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 728d9f4a8..72b67b57d 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