lib/pg_search/document.rb in pg_search-1.0.5 vs lib/pg_search/document.rb in pg_search-1.0.6

- old
+ new

@@ -5,13 +5,10 @@ include PgSearch self.table_name = 'pg_search_documents' belongs_to :searchable, :polymorphic => true - before_validation :update_content, - :unless => Proc.new { |doc| doc.searchable.nil? } - # The logger might not have loaded yet. # https://github.com/Casecommons/pg_search/issues/26 def self.logger super || Logger.new(STDERR) end @@ -23,15 +20,7 @@ {:query => args.first}.merge(PgSearch.multisearch_options) end {:against => :content}.merge(options) } - - private - - def update_content - methods = Array(searchable.pg_search_multisearchable_options[:against]) - searchable_text = methods.map { |symbol| searchable.send(symbol) }.join(" ") - self.content = searchable_text - end end end