Skip to content

Commit

Permalink
Remove :locale option. acts_as_tsearch supported this only with pre-8…
Browse files Browse the repository at this point in the history
….3 versions of PostgreSQL.
  • Loading branch information
Oshoma Momoh committed Mar 26, 2009
1 parent 11bdfea commit 2c694a9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/acts_as_tsearch.rb
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2c694a9

Please sign in to comment.