tansaku/LocalSupport

View on GitHub
app/controllers/mail_templates_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use && instead of and. (https://github.com/bbatsov/ruby-style-guide#no-and-or-or)
Open

    (redirect_to :back and return) unless @mail_template.update_attributes(mail_params)

This cop checks for uses of and and or, and suggests using && and || instead. It can be configured to check only in conditions, or in all contexts.

Example: EnforcedStyle: always (default)

# bad
foo.save and return

# bad
if foo and bar
end

# good
foo.save && return

# good
if foo && bar
end

Example: EnforcedStyle: conditionals

# bad
if foo and bar
end

# good
foo.save && return

# good
foo.save and return

# good
if foo && bar
end

There are no issues that match your filters.

Category
Status