Text_field_with_auto_complete with regular expression

I’m using text_field_with_auto_complete to index the keywords of
something.I created a ‘resource’ model,and it has a ‘keywords’ column.
in the resource controller:
auto_complete_for :resource,:keywords
and in the view:
<%= text_field_with_auto_complete :resource, :keywords, {:onfocus =>
“resource_keywords_auto_completer.activate()”}, {:method
=> :get, :frequency => 0,:after_update_element =>
“function(element,value){” + remote_function(:url =>
{:action => :search},:with=>"‘keywords=’+element.value") + “}”} %>

Let me explain it.I want to redirect to a page with parameters when
somebody click the listed items.This is not the keystone,the keystone
is how can I index the ‘keywords’ column with a regular expression?
(the original regular expression doesn’t fits me).
For example,I have a “resource” whose keywords is “Michael J.”,in
the original condition,when I type in “ael Jac”,the “Michael J.”
keywords can be indexed.But when type in “Jackson Michael” it can’t.I
want the “Michael J.” to be indexed whichever I type in “jackson
michael” or “leahciM” or “aelMich” or"sonJack". ie.separate every
words to match the “keywords”.

I’m from China and my English maybe not good,so please understand.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs