On May 22, 2010, at 10:31 PM, tjg wrote:

I could *almost* taste that big bucket of win, but when I do this:

<controls:>
        <if test="&@package.state == 'Draft'">
                <edit-link/>
                <delete-button/>
        </if>
</controls:>

Hobo turfs up this error:

ActionView::TemplateError (undefined method `edit_link' for
#<ActionView::Base:0x10a5bef68>)

Damn. So close. Is there something particular about the <controls> tag
I'm missing?


Whoops! Was not paying close enough attention to the source - there isn't an 'edit-link' tag explicitly defined in the standard taglibs. The relevant bit of code is from rapid_document_tags.dryml, around line 124 (in the hobo source):

<td class="controls" param="controls" if="&all_parameters[:controls]"> <a param="edit-link" action="edit" if="&can_edit?"><ht key="hobo.action.edit">Edit</ht></a>
                <delete-button param/>
              </td>

So the *param* is named edit-link, but there's not really a tag called that. As a generic alternative, you could use param-content (see the DRYML docs, the section on "Wrapping Content"):

<controls:>
  <if test="&@package.state == 'Draft'">
    <param-content for="controls" />
  </if>
</controls:>

Sorry for the mixup!

--Matt Jones

--
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to