Hi all,
I'm working with a Package model that has_many Documents. The <show-
page> for a Package was nicely showing its child Documents in a <table-
plus> and I had an inline <new-page> for Documents just under the
table. Everything looked great,
Then, I refactored: I decided that I shouldn't be able to add and
remove documents while on the package <show> page. To do that, I
should be *editing* the package.
So, I introduced an <edit-page> template for the Package. The
refactoring quickly turned back into development. I lost the <new-
link> tag for Documents, and consequently the inline <new-page> for
the document
I'm uncertain why the Package <show-page> and <edit-page> differ so
much.
My Package <edit-page> now looks like this:
<edit-page>
<form:>
<submit:package label="#{ht
'packages.actions.save', :default=>['Save']}"/>
<or-cancel />
<br />
<h3>Documents in this package:</h3>
<table-plus with="&@package.documents" fields="id, this,
created_at, updated_at">
<controls: />
</table-plus>
<!-- Can't use <new-link> so create our own, using context of
documents -->
<a:documents action="new"/>
</form:>
</edit-page>
I had to make a manual link for creating new documents, but is there a
more appropriate Hobo tag that would have worked here? <new-
link:documents /> just results in 'undefined method'.
And, is there any way for me to restore the inline <new-page> for a
document when on the package <edit-page>?
Thanks,
Tim
--
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.