Your second example would be the closest I'd think... ahh, that's what
you want.  <input with="#{attribute}" /> I believe.

What you lacked in the second was the parent of the field so that hobo
could set the context properly and the first just passed input a
string.  I'm not sure but I think the above will evaluate the string
and then use the default with attribute function of selecting a field
from the current model.

On Jul 13, 3:34 am, adamski <[email protected]> wrote:
> What would be the best most Hobo-ish way to have a dynamic input
> field: say you have a string called 'attribute' -
> my colleague tried a few ways e.g.
>
> <input with="&attribute"/>
>
> <input with="&this.send(attribute)"/>
>
> and then the  normal rails way
>
> <input type="text" name="#{model_name}[#{attribute}]" ><%=this.send
> (attribute)%></input>
>
> which works (adding type='text' seemed to stop Hobo trying to render
> the tag)
> I'm curious though if there is a neat way of doing something like this
> in Hobo?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
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