From 747aea30c3276c69c20b57f3d7777b6a456bd051 Mon Sep 17 00:00:00 2001 From: safa Date: Fri, 24 Nov 2023 17:31:58 +0100 Subject: [PATCH] Update documentation --- docs/cops_solidus.md | 22 ++++++++++++++++++++++ docs/index.md | 1 + 2 files changed, 23 insertions(+) diff --git a/docs/cops_solidus.md b/docs/cops_solidus.md index ffa9c73..f8786d9 100644 --- a/docs/cops_solidus.md +++ b/docs/cops_solidus.md @@ -305,3 +305,25 @@ I18n.t('bar', scope: 'spree.admin.city') ### References * [https://github.com/solidusio/rubocop-solidus/issues/22](https://github.com/solidusio/rubocop-solidus/issues/22) + +## Solidus/TaxCategoryDeprecated + +Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version +--- | --- | --- | --- | --- | --- +Enabled | Yes | No | <> | - | 2.2 + +This cop finds .tax_category occurrences and suggest using .tax_categories instead. + +### Examples + +```ruby +# bad + model.tax_category = data + +# good + model.tax_categories = [data] +``` + +### References + +* [https://github.com/solidusio/rubocop-solidus/issues/25](https://github.com/solidusio/rubocop-solidus/issues/25) diff --git a/docs/index.md b/docs/index.md index 58438c3..35e49db 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,5 +14,6 @@ In the following sections, you will find all available cops: * [Solidus/SpreeIconDeprecated](cops_solidus.md#solidusspreeicondeprecated) * [Solidus/SpreeRefundCallPerform](cops_solidus.md#solidusspreerefundcallperform) * [Solidus/SpreeTDeprecated](cops_solidus.md#solidusspreetdeprecated) +* [Solidus/TaxCategoryDeprecated](cops_solidus.md#solidustaxcategorydeprecated) \ No newline at end of file