Fix all Layout/SpaceAfterComma issues and remove from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-21 22:37:06 +02:00
parent c862543e6f
commit e6dd33bd66
15 changed files with 17 additions and 32 deletions

View File

@@ -10,7 +10,7 @@ module Ahoy
# chart
def add(name, collection)
collections.push data: collection, name: name
collection.each{ |k,v| add_key k }
collection.each{ |k, v| add_key k }
end
def build

View File

@@ -14,7 +14,7 @@ module SearchCache
def searchable_values_sql
searchable_values
.select{ |k,_| k.present? }
.select{ |k, _| k.present? }
.collect{ |value, weight| set_tsvector(value, weight) }
.join(" || ")
end

View File

@@ -9,7 +9,7 @@ module Taggable
def tag_list_with_limit(limit = nil)
return tags if limit.blank?
tags.sort{|a,b| b.taggings_count <=> a.taggings_count}[0, limit]
tags.sort{|a, b| b.taggings_count <=> a.taggings_count}[0, limit]
end
def tags_count_out_of_limit(limit = nil)

View File

@@ -44,7 +44,7 @@ class SpendingProposal < ActiveRecord::Base
end
def self.filter_params(params)
params.select{|x,_| %w{geozone_id administrator_id tag_name valuator_id}.include? x.to_s }
params.select{|x, _| %w{geozone_id administrator_id tag_name valuator_id}.include? x.to_s }
end
def self.scoped_filter(params, current_filter)

View File

@@ -74,7 +74,7 @@ class User < ActiveRecord::Base
username: auth.info.name || auth.uid,
email: oauth_email,
oauth_email: oauth_email,
password: Devise.friendly_token[0,20],
password: Devise.friendly_token[0, 20],
terms_of_service: '1',
confirmed_at: oauth_email_confirmed ? DateTime.current : nil
)