Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
safafa committed Nov 7, 2023
1 parent 56aae04 commit 20dfd00
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rubocop-solidus (0.2.0)
rubocop-solidus (0.3.0)
rubocop

GEM
Expand Down
1 change: 1 addition & 0 deletions docs/cops.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<!-- END_COP_LIST -->
18 changes: 18 additions & 0 deletions docs/cops_solidus.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```

0 comments on commit 20dfd00

Please sign in to comment.