Rubocop autocorrections

This commit is contained in:
Bertocq
2017-11-13 02:22:00 +01:00
parent 57f8aacdd7
commit cd66ba5d54
9 changed files with 63 additions and 65 deletions

View File

@@ -57,8 +57,7 @@ class Legislation::Proposal < ActiveRecord::Base
tag_list.join(' ') => 'B',
geozone.try(:name) => 'B',
summary => 'C',
description => 'D'
}
description => 'D'}
end
def self.search(terms)
@@ -69,7 +68,7 @@ class Legislation::Proposal < ActiveRecord::Base
def self.search_by_code(terms)
matched_code = match_code(terms)
results = where(id: matched_code[1]) if matched_code
return results if (results.present? && results.first.code == terms)
return results if results.present? && results.first.code == terms
end
def self.match_code(terms)
@@ -105,9 +104,7 @@ class Legislation::Proposal < ActiveRecord::Base
end
def register_vote(user, vote_value)
if votable_by?(user)
vote_by(voter: user, vote: vote_value)
end
vote_by(voter: user, vote: vote_value) if votable_by?(user)
end
def code