Hi Guy.
I saw this great example of overriding the input mode of a particular
model throughout the entire application in another thread here.
It looked like this:
<def tag="input-many" for="Offer">
<input-many>
<name-one:engineer/>
</input-many>
</def>
In this example, any time an object of type Offer is referenced by an
<input-many> tag
(which is the default for direct has_many associations), it will use this
definition
instead of the standard one.
It's brilliant because it also overrides in the context of automatically
generated
forms in a has_many context (which does not make use of the form tag
but simply throws in a fields tag).
I'd really like to do the same sort of thing for the <select-many> tag like
this:
<def tag="select-many" for="Category">
<check-many options="&Category.all.to_a.sort {|a,b| a.name <=> b.
name}"/>
</def>
If I could do that, then whenever an inline form gets auto-generated for one
of my models that includes a categories attribute, the input mode would
default
to check-many instead of the standard select-many.
Alas, the library definition of the select-many tag is not polymorphic
so my specialization of select-many for the Category class is ineffective.
Is it possible for me to re-define the select-many tag to add polymorphism?
(without having to fork the hobo repository or copy and paste the
entire definition of select-many from the hobo_rapid library to my
application.dryml file)
- Steve Madere
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.