# Page attachments update/bugfix

**URL:** <https://www.ruby-forum.com/t/page-attachments-update-bugfix/110934>\
**Category:** Radiant CMS\
**Created:** [August 1, 2007, 5:58am UTC](https://www.ruby-forum.com/t/page-attachments-update-bugfix/110934 "2007-08-01T05:58:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [August 1, 2007, 5:58am UTC](https://www.ruby-forum.com/t/page-attachments-update-bugfix/110934/1 "2007-08-01T05:58:19Z")

</div>

Everyone,

I have fixed the problem with the \<r:attachment:each\> tag that you were  
all experiencing. One would think that having written at least a dozen  
iterators for various extensions that I would remember this small  
concept that I missed. My apologies. You may have seen a “#” in the  
output, but that was just the result of Ruby turning an Array full of  
attachments into a string, i.e. calling .to\_s on each one in turn. This  
will produce something like the following:

#PageAttachment:0x2855320#PageAttachment:0x28552d0

Hence the quasi-random # in the output. Instead, I needed to push the  
output of each iteration into a string. _headdesk_

Please update your copy of page\_attachments if you need this  
functionality.

Sean

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [August 1, 2007, 11:13pm UTC](https://www.ruby-forum.com/t/page-attachments-update-bugfix/110934/2 "2007-08-01T23:13:11Z")

</div>

Sean C. wrote:

> I have fixed the problem with the \<r:attachment:each\> tag that you were  
> all experiencing.

I’m getting “canâ€™t convert nil into String” output for both of the  
following:  
\<r:attachment:each\>\<r:link /\>\</r:attachment:each\>  
\<r:attachment:each\>\<r:attachment:link /\>\</r:attachment:each\>

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [August 1, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/page-attachments-update-bugfix/110934/3 "2007-08-01T23:15:05Z")

</div>

> Sean C. wrote:  
> I have fixed the problem with the \<r:attachment:each\> tag that you were  
> all experiencing.

> David P. wrote:  
> I’m getting “canâ€™t convert nil into String” output for both of the  
> following:  
> \<r:attachment:each\>\<r:link /\>\</r:attachment:each\>  
> \<r:attachment:each\>\<r:attachment:link /\>\</r:attachment:each\>

I should add that the usual \<r:attachment:link name=“xxxxx” /\> works  
fine.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [August 3, 2007, 12:35am UTC](https://www.ruby-forum.com/t/page-attachments-update-bugfix/110934/4 "2007-08-03T00:35:33Z")

</div>

Is the page attachments extension fully operational now - I need to use  
the tag

\<r:attachment:each\>.

Keith
