I have a cronjob that runs “ruby script/runner ‘Channel.preload’”.
Channel is a parent model, Item is the child model (i.e., Channel
has_many :items and Item belongs_to :channel). The coupling is
minimized, the coherence looks good, but I’m not sure the model is the
right place to put this code. Is there a better place to put this
code, e.g., a component (I don’t really understand components and
attempts to use them haven’t worked as expected/advertised). The code
could go in a module, i.e., all the added code is class methods.
TIA,
Jeffrey