You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there's a problem in development if the ProductsCounter class is loaded before the User class since the counter doesn't know it's associated with User -> Products. It's just given the association not the parent model. This can lead to an error or the wrong name being used (I can't remember, one or the other). I've seen this happen in very isolated tests or the Rails console.
Some ideas:
Put all counters into their own directory
Counters need to specify the parent model and association (unless they are manual counters)
if we did that, is it necessary to specify counter ProductsCounter in the User model?
If not, is that a weird thing since Rails devs probably expect something to appear there
if we want something there, how should we restructure the counter definitions?
The text was updated successfully, but these errors were encountered:
I think there's a problem in development if the
ProductsCounter
class is loaded before theUser
class since the counter doesn't know it's associated with User -> Products. It's just given the association not the parent model. This can lead to an error or the wrong name being used (I can't remember, one or the other). I've seen this happen in very isolated tests or the Rails console.Some ideas:
counter ProductsCounter
in the User model?The text was updated successfully, but these errors were encountered: