From 20dfd00268fff3afd77a34070b2e1821f8da1bb0 Mon Sep 17 00:00:00 2001 From: safa Date: Tue, 7 Nov 2023 13:22:48 +0100 Subject: [PATCH] Update documentation --- Gemfile.lock | 2 +- docs/cops.md | 1 + docs/cops_solidus.md | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e6883b0..8a3ddc9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-solidus (0.2.0) + rubocop-solidus (0.3.0) rubocop GEM diff --git a/docs/cops.md b/docs/cops.md index b29b3d9..09486e8 100644 --- a/docs/cops.md +++ b/docs/cops.md @@ -16,5 +16,6 @@ In the following section you 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 diff --git a/docs/cops_solidus.md b/docs/cops_solidus.md index 3a836fe..8b84bbc 100644 --- a/docs/cops_solidus.md +++ b/docs/cops_solidus.md @@ -302,3 +302,21 @@ 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 | 0.3 | - | 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] +```