Fix all Layout/SpaceAroundEqualsInParameterDefault rubocop issues from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-26 18:03:40 +02:00
parent e6dd33bd66
commit d7b8777395
15 changed files with 19 additions and 41 deletions

View File

@@ -1,11 +1,11 @@
module CacheKeysHelper
def locale_and_user_status(authorable=nil)
def locale_and_user_status(authorable = nil)
@cache_key_user ||= calculate_user_status(authorable)
"#{I18n.locale}/#{@cache_key_user}"
end
def calculate_user_status(authorable=nil)
def calculate_user_status(authorable = nil)
user_status = "user"
if user_signed_in?

View File

@@ -18,7 +18,7 @@ module ProposalsHelper
end
end
def namespaced_proposal_path(proposal, options={})
def namespaced_proposal_path(proposal, options = {})
@namespace_proposal_path ||= namespace
case @namespace_proposal_path
when "management"

View File

@@ -4,7 +4,7 @@ module SpendingProposalsHelper
ActsAsTaggableOn::Tag.spending_proposal_tags.pluck(:name)
end
def namespaced_spending_proposal_path(spending_proposal, options={})
def namespaced_spending_proposal_path(spending_proposal, options = {})
@namespace_spending_proposal_path ||= namespace
case @namespace_spending_proposal_path
when "management"

View File

@@ -1,27 +1,27 @@
module StatsHelper
def events_chart_tag(events, opt={})
def events_chart_tag(events, opt = {})
events = events.join(',') if events.is_a? Array
opt[:data] ||= {}
opt[:data][:graph] = admin_api_stats_path(events: events)
content_tag :div, "", opt
end
def visits_chart_tag(opt={})
def visits_chart_tag(opt = {})
events = events.join(',') if events.is_a? Array
opt[:data] ||= {}
opt[:data][:graph] = admin_api_stats_path(visits: true)
content_tag :div, "", opt
end
def spending_proposals_chart_tag(opt={})
def spending_proposals_chart_tag(opt = {})
events = events.join(',') if events.is_a? Array
opt[:data] ||= {}
opt[:data][:graph] = admin_api_stats_path(spending_proposals: true)
content_tag :div, "", opt
end
def budget_investments_chart_tag(opt={})
def budget_investments_chart_tag(opt = {})
events = events.join(',') if events.is_a? Array
opt[:data] ||= {}
opt[:data][:graph] = admin_api_stats_path(budget_investments: true)

View File

@@ -1,6 +1,6 @@
module TracksHelper
def track_event(data={})
def track_event(data = {})
track_data = ""
prefix = " data-track-event-"
data.each do |key, value|

View File

@@ -1,6 +1,6 @@
module ValuationHelper
def valuator_select_options(valuator=nil)
def valuator_select_options(valuator = nil)
if valuator.present?
Valuator.where.not(id: valuator.id).order("description ASC").order("users.email ASC").includes(:user).collect { |v| [ v.description_or_email, v.id ] }.prepend([valuator.description_or_email, valuator.id])
else

View File

@@ -5,7 +5,7 @@ class DeviseMailer < Devise::Mailer
protected
def devise_mail(record, action, opts={})
def devise_mail(record, action, opts = {})
I18n.with_locale record.locale do
super(record, action, opts)
end

View File

@@ -44,7 +44,7 @@ class Comment < ActiveRecord::Base
after_create :call_after_commented
def self.build(commentable, user, body, p_id=nil)
def self.build(commentable, user, body, p_id = nil)
new commentable: commentable,
user_id: user.id,
body: body,

View File

@@ -13,7 +13,7 @@ class Officing::Residence
validate :allowed_age
validate :residence_in_madrid
def initialize(attrs={})
def initialize(attrs = {})
super
clean_document_number
end

View File

@@ -2,7 +2,7 @@ class TagCloud
attr_accessor :resource_model, :scope
def initialize(resource_model, scope=nil)
def initialize(resource_model, scope = nil)
@resource_model = resource_model
@scope = scope
end

View File

@@ -17,7 +17,7 @@ class Verification::Residence
validate :allowed_age
validate :document_number_uniqueness
def initialize(attrs={})
def initialize(attrs = {})
self.date_of_birth = parse_date('date_of_birth', attrs)
attrs = remove_date('date_of_birth', attrs)
super