Commit db32f4f6ee4048b79484e8087bb5eaee3379b56a

Authored by Laust Rud Jacobsen
1 parent e3ebbbc3
Exists in master and in 1 other branch production

Rubocop: default parameter formatting

.rubocop_todo.yml
@@ -304,12 +304,6 @@ Style/SingleSpaceBeforeFirstArg: @@ -304,12 +304,6 @@ Style/SingleSpaceBeforeFirstArg:
304 - 'spec/fabricators/notice_fabricator.rb' 304 - 'spec/fabricators/notice_fabricator.rb'
305 - 'spec/fabricators/user_fabricator.rb' 305 - 'spec/fabricators/user_fabricator.rb'
306 306
307 -# Offense count: 2  
308 -# Cop supports --auto-correct.  
309 -# Configuration parameters: EnforcedStyle, SupportedStyles.  
310 -Style/SpaceAroundEqualsInParameterDefault:  
311 - Enabled: false  
312 -  
313 # Offense count: 27 307 # Offense count: 27
314 # Cop supports --auto-correct. 308 # Cop supports --auto-correct.
315 # Configuration parameters: EnforcedStyle, SupportedStyles. 309 # Configuration parameters: EnforcedStyle, SupportedStyles.
app/helpers/application_helper.rb
@@ -53,7 +53,7 @@ module ApplicationHelper @@ -53,7 +53,7 @@ module ApplicationHelper
53 end 53 end
54 end 54 end
55 55
56 - def create_percentage_table_from_tallies(tallies, options={}) 56 + def create_percentage_table_from_tallies(tallies, options = {})
57 total = (options[:total] || total_from_tallies(tallies)) 57 total = (options[:total] || total_from_tallies(tallies))
58 percent = 100.0 / total.to_f 58 percent = 100.0 / total.to_f
59 rows = tallies.map {|value, count| [(count.to_f * percent), value]} \ 59 rows = tallies.map {|value, count| [(count.to_f * percent), value]} \
app/helpers/sort_helper.rb
1 # encoding: utf-8 1 # encoding: utf-8
2 module SortHelper 2 module SortHelper
3 - def link_for_sort(name, field=nil) 3 + def link_for_sort(name, field = nil)
4 field ||= name.underscore 4 field ||= name.underscore
5 current = (params_sort == field) 5 current = (params_sort == field)
6 order = (current && (params_order == "asc")) ? "desc" : "asc" 6 order = (current && (params_order == "asc")) ? "desc" : "asc"