Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeater with Attachments #1385

Open
dirschn opened this issue Oct 8, 2024 · 2 comments
Open

Repeater with Attachments #1385

dirschn opened this issue Oct 8, 2024 · 2 comments

Comments

@dirschn
Copy link

dirschn commented Oct 8, 2024

Hi all! Stumbled across this gem (pun intended) a couple weeks ago and am quite impressed with it! I have a question regarding a repeater with an attachment, however. I have a repeater with an image, and was able to access the image tag helper like so:

<% repeater(:name) do |part| %>
  <%= part.content.image_tag(:image_part...) %>

But I'm having trouble doing the same with attachments. I've tried

<% repeater(:name) do |part| %>
  <%= part.content.attachment_url(:attachment_part) %>

and

<% repeater(:name) do |part| %>
  <%= content.attachment_url(:name) %>

And maybe a few more but at this point I don't remember them all.

Curiously, I've noticed that I can download the attachment from the media library and have no problem using the attachment_url helper when it's a single attachment. I've also noticed that the signed_blob_id attribute of the part is populated for the single attachment, but is blank when the attachment is part of a repeater.

I'd be happy to tackle this, but I wanted to double check this wasn't known or intended or anything before I put too much time into it!

Copy link

stale bot commented Dec 8, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 8, 2024
@dirschn
Copy link
Author

dirschn commented Dec 9, 2024

I can take some time to look into the code later this week.

@stale stale bot removed the stale label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant