Fix all Style/BracesAroundHashParameters rubocop issues and remove them from rubocop_todo list
This commit is contained in:
@@ -60,7 +60,7 @@ class Admin::Poll::PollsController < Admin::BaseController
|
||||
end
|
||||
|
||||
def search_questions
|
||||
@questions = ::Poll::Question.where("poll_id IS ? OR poll_id != ?", nil, @poll.id).search({search: @search}).order(title: :asc)
|
||||
@questions = ::Poll::Question.where("poll_id IS ? OR poll_id != ?", nil, @poll.id).search(search: @search).order(title: :asc)
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
||||
@@ -58,7 +58,7 @@ class Valuation::SpendingProposalsController < Valuation::BaseController
|
||||
end
|
||||
|
||||
def params_for_current_valuator
|
||||
params.merge({valuator_id: current_user.valuator.id})
|
||||
params.merge(valuator_id: current_user.valuator.id)
|
||||
end
|
||||
|
||||
def restrict_access_to_assigned_items
|
||||
|
||||
@@ -5,15 +5,14 @@ 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
|
||||
end
|
||||
|
||||
@@ -43,14 +43,13 @@ class Officing::Residence
|
||||
end
|
||||
|
||||
def store_failed_census_call
|
||||
FailedCensusCall.create({
|
||||
FailedCensusCall.create(
|
||||
user: user,
|
||||
document_number: document_number,
|
||||
document_type: document_type,
|
||||
year_of_birth: year_of_birth,
|
||||
poll_officer: officer
|
||||
})
|
||||
|
||||
document_type: document_type,
|
||||
year_of_birth: year_of_birth,
|
||||
poll_officer: officer
|
||||
)
|
||||
end
|
||||
|
||||
def user_exists?
|
||||
|
||||
@@ -47,13 +47,13 @@ class Verification::Residence
|
||||
end
|
||||
|
||||
def store_failed_attempt
|
||||
FailedCensusCall.create({
|
||||
FailedCensusCall.create(
|
||||
user: user,
|
||||
document_number: document_number,
|
||||
document_type: document_type,
|
||||
date_of_birth: date_of_birth,
|
||||
postal_code: postal_code
|
||||
})
|
||||
document_type: document_type,
|
||||
date_of_birth: date_of_birth,
|
||||
postal_code: postal_code
|
||||
)
|
||||
end
|
||||
|
||||
def geozone
|
||||
|
||||
Reference in New Issue
Block a user