From 2c694a9aaffaf64f8d63b4311f1004f23d7c9302 Mon Sep 17 00:00:00 2001 From: Oshoma Momoh Date: Thu, 26 Mar 2009 12:03:23 -0700 Subject: [PATCH] Remove :locale option. acts_as_tsearch supported this only with pre-8.3 versions of PostgreSQL. --- lib/acts_as_tsearch.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/acts_as_tsearch.rb b/lib/acts_as_tsearch.rb index a87f283..67d3113 100644 --- a/lib/acts_as_tsearch.rb +++ b/lib/acts_as_tsearch.rb @@ -48,7 +48,7 @@ def extract_tsearch_config_from_options!(options) fields = [] tsearch_config = {} - default_config = {:locale => "default", :auto_update_index => true} + default_config = { :auto_update_index => true } #they passed in :fields => "somefield" or :fields => [:one, :two, :three] #:fields => "somefield" @@ -175,7 +175,6 @@ def find_by_tsearch(search_string, options = nil, tsearch_options = nil) search_string = fix_tsearch_query(search_string) if (tsearch_options[:fix_query].nil? || tsearch_options[:fix_query] == true) - locale = tsearch_config[tsearch_options[:vector].intern][:locale] check_for_vector_column(tsearch_options[:vector]) # define tsearch rank function @@ -296,7 +295,6 @@ def update_vector(row_id = nil, vector_name = "vectors") if !tsearch_config[vector_name.intern] raise "Missing vector #{vector_name} in hash #{tsearch_config.to_yaml}" else - locale = tsearch_config[vector_name.intern][:locale] fields = tsearch_config[vector_name.intern][:fields] tables = tsearch_config[vector_name.intern][:tables] if fields.is_a?(Array)