Replies: 1 comment
-
There are several ways to enable uploads for your custom model. All are Rails default ways to add attachments to a Rails model. To make it work in the Alchemy admin you need to overwrite the form partial in your In your model you can either use active storage or dragonfly accessors to allow attachments. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Background:
I have a model that I would like to reuse on multiple pages. I implemented an ingredient that has a selector that allows me to choose what model record to use where. And I'd like to manage this model directly from Alchemy, so I decided to use a custom module to use Alchemy as backend admin, (following this guide).
Problem:
I'd like to attach an image so I display the same image around in different places. How should I do this?
I was on the path of using ActiveStorage, but I stumbled upon the implementation of
editable_attributes
which builds the form based on the columns of the schema.Is there a "normal" or "easy" way of doing this before I start overriding a lot of code?
Thanks for your time,
Beta Was this translation helpful? Give feedback.
All reactions