ruby on rails 3 - Search by name in non latin characters -
i'm trying search using,
product.order(:name).where("name ?", params[:term])
where :term in non latin characters (hebrew). both application , database set utf-8 application.rb
config.encoding = "utf-8"
database
utf8_unicode_ci
and specific name i'm searching in database, search comes out empty.
any suggestions?
i had add % of own in params[:term:]
is
product.order(:name).where("name ?", params[:term]+"%")
i not sure if best way achieve wanted works nonetheless ...
Comments
Post a Comment