Hi all, I want to use acts_as_ferret in persian language, i have installed ferret and acts as ferret successfully and write model and controller code like the following but by all parameter there is no results. please review this code and guide me to solve this problem. require ''acts_as_ferret'' require ''rubygems'' require ''ferret'' include Ferret has_many :works validates_presence_of :code acts_as_ferret({:fields => [:fname, :lname] }, {:analyzer => Ferret::Analysis::RegExpAnalyzer.new(/ [ابپتثجچحخدذرزصضسشطظکگفقلمنهی ]+/,false)}) Controller : def search @page_title = "Search" if params[:commit] == "Search" || params[:q] @person = MPhone.find_by_contents(params[:q]) unless @person.size > 0 flash.now[:notice] = "No books found matching your criteria" end end end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, what locale are you using as the locale of your OS. Ferret has a mailing list on its own which is a very valueable resource! Cheers, Jan 2007/5/10, ab.mahmoodi <ab.mahmoodi@gmail.com>:> > > Hi all, > > I want to use acts_as_ferret in persian language, i have installed > ferret and acts as ferret successfully and write model and controller > code like the following but by all parameter there is no results. > please review this code and guide me to solve this problem. > > require 'acts_as_ferret' > require 'rubygems' > require 'ferret' > > include Ferret > > has_many :works > validates_presence_of :code > acts_as_ferret({:fields => [:fname, :lname] }, {:analyzer => > Ferret::Analysis::RegExpAnalyzer.new(/ > [ابپتثجچحخدذرزصضسشطظکگفقلمنهی ]+/,false)}) > > > > Controller : > > def search > @page_title = "Search" > if params[:commit] == "Search" || params[:q] > @person = MPhone.find_by_contents(params[:q]) > unless @person.size > 0 > flash.now[:notice] = "No books found matching your criteria" > end > end > end > > > > >-- Jan Prill Rechtsanwalt Grünebergstraße 38 22763 Hamburg Tel +49 (0)40 41265809 Fax +49 (0)40 380178-73022 Mobil +49 (0)171 3516667 http://www.inviado.de --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
hi, my locale is Tehran, Iran On May 10, 11:05 am, "Jan Prill" <JanPr...-sTn/vYlS8ieELgA04lAiVw@public.gmane.org> wrote:> Hi, > > what locale are you using as the locale of your OS. > > Ferret has a mailing list on its own which is a very valueable resource! > > Cheers, > Jan > > 2007/5/10, ab.mahmoodi <ab.mahmo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > > > > Hi all, > > > I want to use acts_as_ferret in persian language, i have installed > > ferret and acts as ferret successfully and write model and controller > > code like the following but by all parameter there is no results. > > please review this code and guide me to solve this problem. > > > require ''acts_as_ferret'' > > require ''rubygems'' > > require ''ferret'' > > > include Ferret > > > has_many :works > > validates_presence_of :code > > acts_as_ferret({:fields => [:fname, :lname] }, {:analyzer => > > Ferret::Analysis::RegExpAnalyzer.new(/ > > [ابپتثجچحخدذرزصضسشطظکگفقلمنهی ]+/,false)}) > > > Controller : > > > def search > > @page_title = "Search" > > if params[:commit] == "Search" || params[:q] > > @person = MPhone.find_by_contents(params[:q]) > > unless @person.size > 0 > > flash.now[:notice] = "No books found matching your criteria" > > end > > end > > end > > -- > Jan Prill > Rechtsanwalt > > Grünebergstraße 38 > 22763 Hamburg > Tel +49 (0)40 41265809 Fax +49 (0)40 380178-73022 > Mobil +49 (0)171 3516667http://www.inviado.de--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---