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 · 0 comments
Open

Repeater with Attachments #1385

dirschn opened this issue Oct 8, 2024 · 0 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!

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