i have just recently migrated from paperclip to active storage and one of the differences that i noticed is that active storage doesn’t provide a way to have a default file. i think that adding a helper method is inconvenient for each model and default file, and checking for the file if it is attached is also an issue that makes view files larger than it should
previously we could have a default behavior on paperclip using the following in our model:
has_attached_file :avatar, default_url: "/images/:style/missing.png"
i am proposing following to be used for active storage, however if this cannot be done and someone has a better spec please comment away.
has_one_attached :avatar, default_file: "/images/:style/missing.png" # or somewhere from assets
for obvious reasons this shouldn’t work on has_many_attached
i hope this is the correct channel for such an issue, if it is not please provide me with the correct one