lib/pg_search/features/feature.rb in pg_search-0.5.4 vs lib/pg_search/features/feature.rb in pg_search-0.5.5
- old
+ new
@@ -9,20 +9,22 @@
@normalizer = normalizer
end
private
+ attr_reader :query, :options, :columns, :model, :normalizer
+
def document
- if @columns.length == 1
- @columns.first.to_sql
+ if columns.length == 1
+ columns.first.to_sql
else
- expressions = @columns.map { |column| column.to_sql }.join(", ")
+ expressions = columns.map { |column| column.to_sql }.join(", ")
"array_to_string(ARRAY[#{expressions}], ' ')"
end
end
def normalize(expression)
- @normalizer.add_normalization(expression)
+ normalizer.add_normalization(expression)
end
end
end
end