Consider adding these attributes for every new model
These are some common attributes that we've found to be useful to include in many models.
The platform is effectively a specialized content management system. As you progress, your team will ask for different areas to be customizable through the interface, rather than code.
However, this causes a delay between the team needing customization having access to it.
Over time we noticed that some attributes frequently repeated:
slug(that should be automatically generated based on the name and have a history so that links don’t break)
- Audit log entries
There would also be a few
scopes, or saved queries:
This functionality can be extracted into a reusable plugin making it trivial to add a decent base level of customization to all content.
In Supplybunny, for instance, I created a concern that has the scopes for the different fields. If the model has the field, I include the concern which creates the scope.
Building this mixin might be considered doing work in advance. However, the time required to build the mixin or to add the functionality once is similar, I think it’s justifiable.
Previous Interface should behave consistently
Suggest an improvement to this page (email@example.com)