Forum: Radiant CMS Page attachments update/bugfix

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sean C. (Guest)
on 2007-08-01 07:58
(Received via mailing list)
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
David P. (Guest)
on 2007-08-02 01:13
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>
David P. (Guest)
on 2007-08-02 01:15
> 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.
Mailing (Guest)
on 2007-08-03 02:35
(Received via mailing list)
Is the page attachments extension fully operational now - I need to use
the tag

<r:attachment:each>.

Keith
This topic is locked and can not be replied to.