Thanks a lot. Worked perfectly.
On 2/28/06, Francois Beausoleil <francois.beausoleil@gmail.com>
wrote:> 2006/2/28, Kenneth Love <kennethlove@gmail.com>:
> > I''m using the acts_as_taggable gem (who''s site has
gone AWOL
> > apparently) and I''m wanting to make it autocomplete. I,
however, am
> > the absolute worst JavaScript person ever, so is there anyone out
> > there that can point me to a tutorial or give some good starting
> > points? Thanks!
>
> <%= text_field_with_auto_complete(''object'',
''tag_names'', {}, {:tokens
> => '' ''}) %>
>
> You need an implementation of auto_complete_for_object_tag_names in
> your controller:
> def auto_complete_for_party_tag_names
> @tags = Tag.find(:all, :conditions => [''name LIKE
?'',
> "#{params[:party][:tag_names]}%"])
> render :inline => "<%= auto_complete_result(@tags,
''name'') %>",
> :layout => false
> end
>
> See the docs for the #text_field_with_auto_complete method at:
>
http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptMacrosHelper.html#M000377
>
> Hope that helps !
> --
> Fran?ois Beausoleil
> http://blog.teksol.info/
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
--
=> the blog from beyond <=> www.eyeheartzombies.com <=