This repository was archived by the owner on Jul 27, 2025. It is now read-only.
Account namespace updates: part 2 (categories) #894
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #892 for a detailed proposal of these changes. I will be opening several PRs to achieve the final state so there is a semi-readable history of the changes.
Part 2 renames
Transaction::Category
toCategory
and moves all of the routes, controllers, etc. to the top-level namespace.This thins out the hierarchy and will make it much easier to deal with categories in the final stage of this namespace update when we start implementing various types of transactions (some of which may not be valid with a category).
Future considerations for
Category
While a
Category
generally applies to aTransaction
(hence why it was originally namespaced), we have had several feature requests asking to be able to apply categories to theAccount
.By moving to the top-level namespace, we'll be able to use STI (instead of namespacing—lots of duplication) to model out different types of categories:
From a field-level perspective, a
TransactionCategory
andAccountCategory
has nearly the same exact attributes (i.e.name
,color
), making it a good candidate for this type of inheritance. We can then use thetype
to help delineate the management of these family-defined categories in the UI.