diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ddcf8032c..1ce515947 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -210,14 +210,6 @@ Layout/AlignParameters: - 'spec/models/user_spec.rb' - 'spec/rails_helper.rb' -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: always, conditionals -Style/AndOr: - Exclude: - - 'app/helpers/embed_videos_helper.rb' - # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods. diff --git a/app/controllers/legislation/annotations_controller.rb b/app/controllers/legislation/annotations_controller.rb index 1605a2f67..fa46e5348 100644 --- a/app/controllers/legislation/annotations_controller.rb +++ b/app/controllers/legislation/annotations_controller.rb @@ -30,7 +30,7 @@ class Legislation::AnnotationsController < ApplicationController def create if !@process.allegations_phase.open? || @draft_version.final_version? - render json: {}, status: :not_found and return + render(json: {}, status: :not_found) && (return) end existing_annotation = @draft_version.annotations.where( diff --git a/app/helpers/embed_videos_helper.rb b/app/helpers/embed_videos_helper.rb index 22b1d878f..cb077ef36 100644 --- a/app/helpers/embed_videos_helper.rb +++ b/app/helpers/embed_videos_helper.rb @@ -21,7 +21,7 @@ module EmbedVideosHelper match = link.match(reg_exp) end - if match and match[2] + if match && match[2] '' else ''