Commit dba2a9eb57391e317100af76538d8c365c7e0b33
1 parent
cd10674d
Exists in
master
and in
1 other branch
Rubocop: move towards fewer single line block invocations
Showing
3 changed files
with
5 additions
and
6 deletions
Show diff stats
.rubocop_todo.yml
... | ... | @@ -273,13 +273,10 @@ Style/SignalException: |
273 | 273 | - 'lib/airbrake_api/v3/notice_parser.rb' |
274 | 274 | - 'lib/hoptoad.rb' |
275 | 275 | |
276 | -# Offense count: 4 | |
276 | +# Offense count: 1 | |
277 | 277 | # Configuration parameters: Methods. |
278 | 278 | Style/SingleLineBlockParams: |
279 | 279 | Exclude: |
280 | - - 'app/helpers/application_helper.rb' | |
281 | - - 'app/helpers/form_helper.rb' | |
282 | - - 'app/models/notice_fingerprinter.rb' | |
283 | 280 | - 'lib/hoptoad/v2.rb' |
284 | 281 | |
285 | 282 | # Offense count: 11 | ... | ... |
app/helpers/form_helper.rb
... | ... | @@ -5,7 +5,9 @@ module FormHelper |
5 | 5 | content_tag(:div, :class => 'error-messages') do |
6 | 6 | body = content_tag(:h2, 'Dang. The following errors are keeping this from being a success.') |
7 | 7 | body + content_tag(:ul) do |
8 | - document.errors.full_messages.inject('') {|errs, msg| errs + content_tag(:li, h(msg)) }.html_safe | |
8 | + document.errors.full_messages.inject('') do |errs, msg| | |
9 | + errs + content_tag(:li, h(msg)) | |
10 | + end.html_safe | |
9 | 11 | end |
10 | 12 | end |
11 | 13 | end | ... | ... |
app/models/notice_fingerprinter.rb