lib/pg_search/features/tsearch.rb in pg_search-1.0.4 vs lib/pg_search/features/tsearch.rb in pg_search-1.0.5

- old
+ new

@@ -9,11 +9,11 @@ end def initialize(*args) super - if options[:prefix] && model.connection.send(:postgresql_version) < 80400 + if options[:prefix] && model.connection.send(:postgresql_version) < 80400 # rubocop:disable Style/GuardClause raise PgSearch::NotSupportedForPostgresqlVersion.new(<<-MESSAGE.strip_heredoc) Sorry, {:using => {:tsearch => {:prefix => true}}} only works in PostgreSQL 8.4 and above.") MESSAGE end end @@ -30,10 +30,10 @@ private DISALLOWED_TSQUERY_CHARACTERS = /['?\\:]/ - def tsquery_for_term(unsanitized_term) + def tsquery_for_term(unsanitized_term) # rubocop:disable Metrics/AbcSize if options[:negation] && unsanitized_term.start_with?("!") unsanitized_term[0] = '' negated = true end