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.
It seems like every time we try to do something with the Companyable system, we have a hard time digging through what it's actually doing, and how.
This attempts to change that. First, I moved the Companyable and CompanyableChild traits into the Traits directory, and took 'Trait' off of their names.
Then, I embedded the scopes that these Traits had attached into the Traits themselves.
Then, I grabbed the appropriate parts of Company that were referred to within those scopes also into the Traits themselves.
The end result is two traits that embed all the functionality that they need directly in them.
There is also an Interface which I decided against moving - it doesn't do much and is only used in two places, and we don't have any other Interfaces within the system. Happy to move it, though, if that's something we want.
This does pass tests, but we should probably click around - some of the changes I had to make might have subtle implications that we might not necessarily test for.