Skip to content

Commit

Permalink
[frontend] Fix Style/AndOr offense
Browse files Browse the repository at this point in the history
Mob-programming with @DavidKang
  • Loading branch information
bgeuken authored and DavidKang committed Dec 15, 2017
1 parent 855a0ae commit 061bc72
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions .rubocop_todo.yml
Expand Up @@ -329,14 +329,6 @@ Rails/SkipsModelValidations:
Rails/TimeZone:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: always, conditionals
Style/AndOr:
Exclude:
- 'src/api/app/views/message/_messages.xml.builder'

# Offense count: 130
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/message/_messages.xml.builder
Expand Up @@ -8,7 +8,7 @@ root_attrs[:package] = @package.name if @package
xml.messages(root_attrs) do
@messages.each do |msg|
attrs = {}
attrs[:severity] = msg.severity or attrs[:severity] = 0
attrs[:severity] = msg.severity || 0
attrs[:sent_at] = msg.sent_at.xmlschema if msg.sent_at
attrs[:user] = msg.user.login if msg.user
msg.send_mail ? attrs[:send_mail] = true : attrs[:send_mail] = false
Expand Down

0 comments on commit 061bc72

Please sign in to comment.