Searching with char like #

Hello i got a field to search a name in the DB

The problem is that the name could have char like #

so in my view:

<%= text_field_with_auto_complete :member, :name%>
<%= observe_field ‘member_name’,
:frequency => 0.5,
:update => ‘member_named’,
:url =>
{:controller=>“admin/members”,:action=>‘live_search’},
:with=> ‘member_name’%>
so if i put on the textfield “peter #2
i got <%=params[member_name]%> peter

so everything after ‘#’ isn’t there, what could i do?

but in the auto_complete all the names appear while i am writing…

You need to escape the input before you send it to your controller
action.

You can use encodeURIComponent for this.

Good luck!

Robby

On Tue, Jun 24, 2008 at 9:42 AM, Edgar G.
[email protected] wrote:

:update => 'member_named',

Posted via http://www.ruby-forum.com/.


Robby R.
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting

http://www.robbyonrails.com/
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]