Skip to content

Commit aef76d8

Browse files
committed
make use of hash value omission
Use Ruby 3.1 hash value omission where the value can be resolved from an identifier with the same name as the key.
1 parent 6c2afc9 commit aef76d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/presenters/how_you_found_us_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def by_percentage
1414
exact = (count / total_responses.to_f) * 100
1515
percentage_value = exact.floor
1616
remainder = exact - percentage_value
17-
{ how: how, percentage_value: percentage_value, remainder: remainder }
17+
{ how:, percentage_value:, remainder: }
1818
end
1919

2020
allocated_so_far = entries.sum { |entry| entry[:percentage_value] }

0 commit comments

Comments
 (0)