diff options
| author | Teddy Wing | 2017-06-15 12:11:55 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-15 12:11:55 +0200 |
| commit | 34ee3f25dd9e903e27bbbbcdf85ae2803a869c76 (patch) | |
| tree | a7c1aec6bac68fbbe85b1ba32b3d3b1789cd9542 /app | |
| parent | 9a2be7854d2149f812f90dd9f42f680199e573d4 (diff) | |
| download | chouette-core-34ee3f25dd9e903e27bbbbcdf85ae2803a869c76.tar.bz2 | |
TableBuilder spec: Decorate companies collection
In order to enable access to `CompanyDecorator#action_links`, wrap the
companies collection passed to the table builder in the test in the
decorator.
Specify the class that `CompanyDecorator` decorates explicitly. Since
`Chouette::Company` is namespaced, Draper can't infer the model from the
decorator class name.
Refs #3479
Diffstat (limited to 'app')
| -rw-r--r-- | app/decorators/company_decorator.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/decorators/company_decorator.rb b/app/decorators/company_decorator.rb index 7d14f8c8b..5a2fdd1c0 100644 --- a/app/decorators/company_decorator.rb +++ b/app/decorators/company_decorator.rb @@ -1,4 +1,6 @@ class CompanyDecorator < Draper::Decorator + decorates Chouette::Company + delegate_all def self.collection_decorator_class |
