Revert rubocop autocorrections and add it to exclusion list on rubocop_todo file

This commit is contained in:
Bertocq
2017-06-28 14:27:49 +02:00
parent c16b0cba4d
commit c4ba35bf63
2 changed files with 17 additions and 8 deletions

View File

@@ -5,14 +5,15 @@ module Searchable
include PgSearch
include SearchCache
pg_search_scope :pg_search,
against: :ignored, # not used since using a tsvector_column
using: {
tsearch: { tsvector_column: 'tsv', dictionary: "spanish", prefix: true }
},
ignoring: :accents,
ranked_by: '(:tsearch)',
order_within_rank: (self.column_names.include?('cached_votes_up') ? "#{self.table_name}.cached_votes_up DESC" : nil)
pg_search_scope :pg_search, {
against: :ignored, # not used since using a tsvector_column
using: {
tsearch: { tsvector_column: 'tsv', dictionary: "spanish", prefix: true }
},
ignoring: :accents,
ranked_by: '(:tsearch)',
order_within_rank: (self.column_names.include?('cached_votes_up') ? "#{self.table_name}.cached_votes_up DESC" : nil)
}
end
end