Project

General

Profile

« Previous | Next » 

Revision cabe2c2e

Added by Ohad Levy about 7 years ago

Fixes #19700 - update rubocop rules

The following changes have been made:

- Performance/RedundantMerge:
changes lines such as:
```not_found_message.merge! :message => options```
to:
```not_found_message[:message] = options```

- converts str.match() to str =~ ()
- remove extra whitespaces etc.

View differences:

app/helpers/hosts_helper.rb
def last_report_tooltip(record)
opts = { :rel => "twipsy" }
if @last_report_ids[record.id]
opts.merge!("data-original-title" => _("View last report details"))
opts["data-original-title"] = _("View last report details")
else
opts.merge!(:disabled => true, :class => "disabled", :onclick => 'return false')
opts.merge!("data-original-title" => _("Report Already Deleted")) unless record.last_report.nil?
opts["data-original-title"] = _("Report Already Deleted") unless record.last_report.nil?
end
opts
end

Also available in: Unified diff