How do I disable attachments for an ActionText field? The only solutions I can find are to hide the Trix button with CSS and a validator for the host model (which makes the model invalid, but it does not prevent a file from being uploaded). Surely I’m missing something?
By only removing the button with CSS and preventing the host model from being valid, I’m still allowing a user to upload as many files of any size to the server as they please.
Additionally, it seems that ActionText/ActiveStorage does not clean up the orphaned files if a user removes one: 1) user adds an attachment 2) user sees the validation that attachments are not allowed 3) user removes attachment 4) attachment seems to persist on the server.