Allow everyone to easily track storage usage
With !27420 (merged) tracking a
ProjectStatistic values became very easy.
- create the new column
- add it to
- add the following snippet to the model generating the value to track
class MyModel < ApplicationRecord include UpdateProjectStatistics update_project_statistics stat: :my_stat, attribute: :attribute_to_track end
Depending on the case you may need to backfill the old data