app/decorators/attachment_decorator.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use String#start_with? instead of a regex match anchored to the beginning of the string.
Open

    if file.content_type =~ /\Aimage/

This cop identifies unnecessary use of a regex where String#start_with? would suffice.

Example:

# bad
'abc' =~ /\Aab/
'abc'.match(/\Aab/)

# good
'abc'.start_with?('ab')

There are no issues that match your filters.

Category
Status