hey all, I have this peace of code:
# new.rhtml: <% form_tag :action => 'create' do %> <%= render :partial => 'form' %> <%= submit_tag "Create" %> <% end %>
# _form.rhtml: <p><label for="list_title">Title</label><br/> <%= text_field 'list', 'title' %></p>
<%= observe_field 'list_title', :frequency => 0.5, :update => 'results', :url => { :controller => 'lists', :action=> 'search' }, :with => "'list[title]=' + escape(value)" %> <!--[eoform:list]-->
<div id="results"> </div>
#controller: def search @title = params['list']['title'] @titles = List.find(:all,:conditions=>['title like ?', "%#{@title}%"]) end
it works great, as I type results are displayed in my results div. But if I try to enter letters with accents like éçèà then nothing get displayed. as an exemple if I type 'test éàç' in the text box I get from development.log:
Processing ListsController#search (for 127.0.1.1 at 2007-01-20 00:28:11) [POST] Session ID: 4fa4b22bbeed42322744501e09eb5601 Parameters: {"list"=>{"title"=>"test "}, "action"=>"search", "controller"=>"lists"} List Load (0.001703) SELECT * FROM lists WHERE (title like '%test %')
any idea how to make it see unicode stuff right?
thanx in advance
Pat