aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/companies_controller.rb2
-rw-r--r--app/controllers/referential_companies_controller.rb2
-rw-r--r--app/decorators/company_decorator.rb8
-rw-r--r--spec/helpers/table_builder_helper_spec.rb2
4 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/companies_controller.rb b/app/controllers/companies_controller.rb
index 1596975b8..07a732fc9 100644
--- a/app/controllers/companies_controller.rb
+++ b/app/controllers/companies_controller.rb
@@ -20,7 +20,7 @@ class CompaniesController < BreadcrumbController
@companies,
with: CompanyDecorator,
context: {
- line_referential: line_referential
+ referential: line_referential
}
)
}
diff --git a/app/controllers/referential_companies_controller.rb b/app/controllers/referential_companies_controller.rb
index 09167009a..53dde93bb 100644
--- a/app/controllers/referential_companies_controller.rb
+++ b/app/controllers/referential_companies_controller.rb
@@ -18,7 +18,7 @@ class ReferentialCompaniesController < ChouetteController
@companies,
with: CompanyDecorator,
context: {
- line_referential: referential
+ referential: referential
}
)
}
diff --git a/app/decorators/company_decorator.rb b/app/decorators/company_decorator.rb
index 030952483..402bd3ab6 100644
--- a/app/decorators/company_decorator.rb
+++ b/app/decorators/company_decorator.rb
@@ -13,7 +13,7 @@ class CompanyDecorator < Draper::Decorator
# Requires:
# context: {
- # line_referential:
+ # referential:
# }
def action_links
links = []
@@ -23,7 +23,7 @@ class CompanyDecorator < Draper::Decorator
binding.pry
links << Link.new(
content: h.t('companies.actions.new'),
- href: h.new_line_referential_company_path(context[:line_referential])
+ href: h.new_line_referential_company_path(context[:referential])
)
end
@@ -31,7 +31,7 @@ class CompanyDecorator < Draper::Decorator
links << Link.new(
content: h.t('companies.actions.edit'),
href: h.edit_line_referential_company_path(
- context[:line_referential],
+ context[:referential],
object
)
)
@@ -41,7 +41,7 @@ class CompanyDecorator < Draper::Decorator
links << Link.new(
content: t('companies.actions.destroy'),
href: h.line_referential_company_path(
- context[:line_referential],
+ context[:referential],
object
),
method: :delete,
diff --git a/spec/helpers/table_builder_helper_spec.rb b/spec/helpers/table_builder_helper_spec.rb
index 4f7c1bd69..c536a4c62 100644
--- a/spec/helpers/table_builder_helper_spec.rb
+++ b/spec/helpers/table_builder_helper_spec.rb
@@ -302,7 +302,7 @@ describe TableBuilderHelper, type: :helper do
companies = ModelDecorator.decorate(
companies,
with: CompanyDecorator,
- context: {line_referential: line_referential}
+ context: { referential: line_referential }
)
stub_policy_scope(company)