I wanted to have an autocompletion on a text-input field country in a model 
Address, that is NOT in an association to the model Country. 
This can be done easily like this:

In *application.dryml*:

> <extend tag="form" for="Address">
>   <old-form merge>
>    <field-list:>
>       <country-view:>
>         <name-one complete-target="&Country.new()" completer="name_admin"/>
>       </country-view:>
>    </field-list:>
>   </old-form>
> </extend>


In *admin/countries_controller.rb*

> class Admin::CountriesController < Admin::AdminSiteController  

  hobo_model_controller

...
>  autocomplete :name
>   ...
> end


If it were not in the Admin subsite, the completer would just be "name".

As a beginner it took me a while to figure the dryml-Part out, so I'd like 
to share. Is this the right place to post such mini-recipies?

-- 
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/groups/opt_out.

Reply via email to