Enable `Style/RedundantCondition` cop

This commit is contained in:
fatkodima 2022-07-20 22:25:23 +03:00
parent e8f189b1cb
commit 86519996f9
2 changed files with 5 additions and 1 deletions

View File

@ -266,6 +266,10 @@ Style/ColonMethodCall:
Style/TrivialAccessors: Style/TrivialAccessors:
Enabled: true Enabled: true
# Prefer a = b || c over a = b ? b : c
Style/RedundantCondition:
Enabled: true
Performance/BindCall: Performance/BindCall:
Enabled: true Enabled: true

View File

@ -297,7 +297,7 @@ module ActiveRecord
end end
end end
query_value("SELECT setval(#{quote(quoted_sequence)}, #{max_pk ? max_pk : minvalue}, #{max_pk ? true : false})", "SCHEMA") query_value("SELECT setval(#{quote(quoted_sequence)}, #{max_pk || minvalue}, #{max_pk ? true : false})", "SCHEMA")
end end
end end