lib/pg_search/normalizer.rb in pg_search-0.3.2 vs lib/pg_search/normalizer.rb in pg_search-0.3.3
- old
+ new
@@ -6,10 +6,10 @@
def add_normalization(original_sql)
normalized_sql = original_sql
if @config.ignore.include?(:accents)
if @config.postgresql_version < 90000
- raise PgSearch::NotSupportedForPostgresqlVersion.new(<<-MESSAGE)
+ raise PgSearch::NotSupportedForPostgresqlVersion.new(<<-MESSAGE.gsub /^\s*/, '')
Sorry, {:ignoring => :accents} only works in PostgreSQL 9.0 and above.
#{@config.inspect}
MESSAGE
else
normalized_sql = "unaccent(#{normalized_sql})"