Open kbrock opened 3 months ago
@agrare Please also review.
update:
tools/feature_supports_matrix
change (already merged)ReadOnlyModels
change (closed that PR)Most models include
SupportsFeatureMixin
. This moves up toApplicationRecord
+1/-73
I understand the intent to avoid duplication here, but "most models" isn't really accurate. There are 457 models roughly, and only 73 have this, which means only 16% of models are like this.
One upside to having it in specific models is we can know what models are the things that are "CI"s (i.e. things that we externally manage). That gets me wondering if we should have a CIMixin
where we take a lot of these common mixins across CIs, then include that. But overall, I'm not sure that would make any benefit.
I'm not against this PR, but I'm not sure - would like a second opinion from @agrare and/or @jrafanie
One upside to having it in specific models is we can know what models are the things that are "CI"s (i.e. things that we externally manage). That gets me wondering if we should have a
CIMixin
where we take a lot of these common mixins across CIs, then include that. But overall, I'm not sure that would make any benefit.
haha, if you can name what this commonality is, we could probably create it. Ideally, all of these things should be reportable, support features, taggable, etc. We can override in classes that can't do one or more of these things if desired. Not sure how much we want to pull into the common place.
I think having a plugin that says "I'm a taggable, rbac applyable, data model that is in each provider" may have merit.
Most models include
SupportsFeatureMixin
. This moves up toApplicationRecord
+1/-73