Nice work Stefan, and thanks a lot for the recipe. The list is a great
place to share this.

You can also add it to the hobocentral comments too, maybe in this page:
http://www.hobocentral.net/manual/controllers#autocompleters

Warm regards,
Ignacio

El 25/11/13 10:38, Stefan Haslinger escribió:
> 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.

-- 
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre

-- 
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