Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to display Active Storage attached file when editing form?

danielindon asked in General

I am building an Agreement management app. Each Agreement has vendor, activation, expiration dates and file. File is an attached agreement in pdf. I use Active Storage for attaching files. When I edit the form I don't see the attached file. As a consequence if I change any other parameter let's say vendor and update Agreement the previously attached file is being deleted.

What should I do to get the attached file name to be present on update and not being removed if I don't upload any other file while editing?

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.