Fix all Layout/SpaceAroundOperators rubocop issues and remove file list from rubocop_todo list
This commit is contained in:
@@ -93,7 +93,7 @@ module Budgets
|
||||
|
||||
def set_random_seed
|
||||
if params[:order] == 'random' || params[:order].blank?
|
||||
params[:random_seed] ||= rand(99)/100.0
|
||||
params[:random_seed] ||= rand(99) / 100.0
|
||||
seed = Float(params[:random_seed]) rescue 0
|
||||
Budget::Investment.connection.execute("select setseed(#{seed})")
|
||||
else
|
||||
|
||||
@@ -20,7 +20,7 @@ class Management::Budgets::InvestmentsController < Management::BaseController
|
||||
@investment.author = managed_user
|
||||
|
||||
if @investment.save
|
||||
notice= t('flash.actions.create.notice', resource_name: Budget::Investment.model_name.human, count: 1)
|
||||
notice = t('flash.actions.create.notice', resource_name: Budget::Investment.model_name.human, count: 1)
|
||||
redirect_to management_budget_investment_path(@budget, @investment), notice: notice
|
||||
else
|
||||
render :new
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module BallotsHelper
|
||||
|
||||
def progress_bar_width(amount_available, amount_spent)
|
||||
(amount_spent/amount_available.to_f * 100).to_s + "%"
|
||||
(amount_spent / amount_available.to_f * 100).to_s + "%"
|
||||
end
|
||||
|
||||
end
|
||||
@@ -11,7 +11,7 @@ module EmbedVideosHelper
|
||||
|
||||
if server == "Vimeo"
|
||||
reg_exp = /vimeo.*(staffpicks\/|channels\/|videos\/|video\/|\/)([^#\&\?]*).*/
|
||||
src = "https://player.vimeo.com/video/"
|
||||
src = "https://player.vimeo.com/video/"
|
||||
elsif server == "YouTube"
|
||||
reg_exp = /youtu.*(be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/
|
||||
src = "https://www.youtube.com/embed/"
|
||||
|
||||
@@ -13,7 +13,7 @@ module OfficingHelper
|
||||
officer_assignments.each do |oa|
|
||||
options << [oa.booth_assignment.booth.name.to_s, oa.id]
|
||||
end
|
||||
options.sort! {|x, y| x[0]<=>y[0]}
|
||||
options.sort! {|x, y| x[0] <=> y[0]}
|
||||
options_for_select(options, params[:oa])
|
||||
end
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ module PollRecountsHelper
|
||||
end
|
||||
|
||||
def booth_assignment_sum_final_recounts(ba)
|
||||
ba.final_recounts.any? ? ba.final_recounts.to_a.sum(&:count) :nil
|
||||
ba.final_recounts.any? ? ba.final_recounts.to_a.sum(&:count) : nil
|
||||
end
|
||||
|
||||
end
|
||||
@@ -18,7 +18,7 @@ module VerificationHelper
|
||||
data_to_mask = match[2]
|
||||
email_provider = match[3]
|
||||
|
||||
data_to_display + "*"*data_to_mask.size + "@" + email_provider
|
||||
data_to_display + "*" * data_to_mask.size + "@" + email_provider
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -205,8 +205,8 @@ class Budget
|
||||
end
|
||||
|
||||
def should_show_aside?
|
||||
(budget.selecting? && !unfeasible?) ||
|
||||
(budget.balloting? && feasible?) ||
|
||||
(budget.selecting? && !unfeasible?) ||
|
||||
(budget.balloting? && feasible?) ||
|
||||
(budget.valuating? && !unfeasible?)
|
||||
end
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class Comment < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def author=(author)
|
||||
self.user= author
|
||||
self.user = author
|
||||
end
|
||||
|
||||
def total_votes
|
||||
|
||||
@@ -3,7 +3,7 @@ module Conflictable
|
||||
|
||||
def conflictive?
|
||||
return false unless flags_count > 0 && cached_votes_up > 0
|
||||
cached_votes_up/flags_count.to_f < 5
|
||||
cached_votes_up / flags_count.to_f < 5
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -35,7 +35,7 @@ class Legislation::Annotation < ActiveRecord::Base
|
||||
selector_end = "/html/body/#{range_end}"
|
||||
el_end = doc.at_xpath(selector_end)
|
||||
|
||||
remainder_el_start = el_start.text[0 .. range_start_offset-1] unless range_start_offset.zero?
|
||||
remainder_el_start = el_start.text[0 .. range_start_offset - 1] unless range_start_offset.zero?
|
||||
remainder_el_end = el_end.text[range_end_offset .. -1]
|
||||
|
||||
self.context = "#{remainder_el_start}<span class=annotator-hl>#{quote}</span>#{remainder_el_end}"
|
||||
|
||||
Reference in New Issue
Block a user