app/controllers/users/omniauth_callbacks_controller.rb
Favor a normal if-statement over a modifier clause in a multiline statement. Open
Open
set_flash_message(
:notice,
:success,
kind: 'Facebook'
) if is_navigational_format?
- Read upRead up
- Exclude checks
Checks for uses of if/unless modifiers with multiple-lines bodies.
Example:
# bad
{
result: 'this should not happen'
} unless cond
# good
{ result: 'ok' } if cond