Apply Rails/Presence rubocop rule

This commit is contained in:
Javi Martín
2019-06-22 22:03:46 +02:00
parent adc5906253
commit a5ba13b599
13 changed files with 19 additions and 23 deletions

View File

@@ -65,7 +65,7 @@ class Legislation::PeopleProposal < ApplicationRecord
def self.search(terms)
by_code = search_by_code(terms.strip)
by_code.present? ? by_code : pg_search(terms)
by_code.presence || pg_search(terms)
end
def self.search_by_code(terms)