aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/decorators/company_decorator.rb2
-rw-r--r--spec/helpers/table_builder_helper_spec.rb5
2 files changed, 7 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
diff --git a/spec/helpers/table_builder_helper_spec.rb b/spec/helpers/table_builder_helper_spec.rb
index c5cbd972d..89660dd56 100644
--- a/spec/helpers/table_builder_helper_spec.rb
+++ b/spec/helpers/table_builder_helper_spec.rb
@@ -200,6 +200,11 @@ describe TableBuilderHelper, type: :helper do
referential_id: referential.id
})
+ companies = ModelDecorator.decorate(
+ companies,
+ with: CompanyDecorator
+ )
+
expected = <<-HTML
<table class="table has-search">
<thead>