Forum: Ruby on Rails using acts_as_ferret in non latin language

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Abolfazl M. (Guest)
on 2007-05-10 09:24
(Received via mailing list)
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 P. (Guest)
on 2007-05-10 11:06
(Received via mailing list)
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 <removed_email_address@domain.invalid>:
>   require 'rubygems'
>
>     end
> end
>
>
> >
>


--
Jan P.
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
Abolfazl M. (Guest)
on 2007-05-10 13:24
(Received via mailing list)
hi,
my locale is Tehran, Iran
This topic is locked and can not be replied to.