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
In the spirit of #3, I'm wondering how I could add the ActiveStorage accessors for has_many_attached?
In the #3 it was said that you could add a belongs_to to the model, but in this case the accessors and relations should really be added to the parent.
Wouldn't it make more sense to create a real, generated model inside app/models, since that would also make autoloading work as expected (i.e. I don't have to load Article to instantiate ArticleDetailsEntry or similar)
The text was updated successfully, but these errors were encountered:
So perhaps it should just be just ArticleDetailsEntry.class_exec do has_many_attached :files end after instantiating Article? :) If so, this issue might serve as documentation.
In the spirit of #3, I'm wondering how I could add the ActiveStorage accessors for
has_many_attached
?In the #3 it was said that you could add a
belongs_to
to the model, but in this case the accessors and relations should really be added to the parent.Wouldn't it make more sense to create a real, generated model inside
app/models
, since that would also make autoloading work as expected (i.e. I don't have to load Article to instantiate ArticleDetailsEntry or similar)The text was updated successfully, but these errors were encountered: