diff options
| author | Teddy Wing | 2018-01-25 16:14:59 +0100 | 
|---|---|---|
| committer | Zog | 2018-01-25 17:19:22 +0100 | 
| commit | 988d074946990dc72e41af4d5fa1839fdb39d59e (patch) | |
| tree | e49d1082d500bef37908cd93200e3a7db52ae114 | |
| parent | d4674437a48af8d8d388b6e122bf46cc437d12ff (diff) | |
| download | chouette-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.rb | 8 | ||||
| -rw-r--r-- | app/decorators/import_resource_decorator.rb | 10 | ||||
| -rw-r--r-- | app/views/import_resources/index.html.slim | 1 | 
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 | 
