lib/teamsupport/customer.rb
This conditional expression can just be replaced by @attrs[:NeedsIndexing] == 'True'
. Open
Open
@attrs[:NeedsIndexing] == 'True' ? true : false
- Read upRead up
- Exclude checks
This cop checks for redundant returning of true/false in conditionals.
Example:
# bad
x == y ? true : false
# bad
if x == y
true
else
false
end
# good
x == y
# bad
x == y ? false : true
# good
x != y
This conditional expression can just be replaced by @attrs[:IsActive] == 'True'
. Open
Open
@attrs[:IsActive] == 'True' ? true : false
- Read upRead up
- Exclude checks
This cop checks for redundant returning of true/false in conditionals.
Example:
# bad
x == y ? true : false
# bad
if x == y
true
else
false
end
# good
x == y
# bad
x == y ? false : true
# good
x != y
This conditional expression can just be replaced by @attrs[:HasPortalAccess] == 'True'
. Open
Open
@attrs[:HasPortalAccess] == 'True' ? true : false
- Read upRead up
- Exclude checks
This cop checks for redundant returning of true/false in conditionals.
Example:
# bad
x == y ? true : false
# bad
if x == y
true
else
false
end
# good
x == y
# bad
x == y ? false : true
# good
x != y