Hobo is pretty radically awesome, and I'm just beginning to get the
feel of it. I had one kind of use case that I wanted to get opinions
on. Let's say you are creating a form that is not backed by an
ActiveRecord model (and you still want the look and feel to be
consistent). Peeping through the source code, I see stuff like:
<labelled-item-list param>
<labelled-item>
<item-label param="login-label"><%=
model.login_attribute.to_s.titleize %></item-label>
<item-value><input type="text" name="login" id="login"
class="string" param="login-input" /></item-value>
</labelled-item>
This is very verbose mind you. It's more verbose than what I can do
with Rails helpers themselves.
What I was wondering was if either I could create some tags to reduce
this verbosity or if there was something already in Hobo I could use.
The intuitive thing that it seems I want to be doing is to inject a
set of tags into an iterator that wraps each of them. Of course, I
could probably create some data structure of metadata for the
attributes and then iterate over those, but that feels clunky to me.
Where would I create the data structure? In my controller? In my view?
It would be better, more DRYML-ish, and more declarative if I could do
it all with tags. I'm imagining something kind of like:
<form action="&blah">
<fields>
<text_field:name>
</fields>
<div param="actions"><submit/></div>
</form>
So my question to everyone is: what's the smartest way to go about
doing this? Should I write a bunch of tags named <text_field> and
<text_area> that basically create a <labelled-item> with a field
inside, using <fields> as an alias for <labelled-item-list>? Or is
there some smarter way to do this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---