Fix Style/AndOr rubocop issue and remove from rubocop_todo list
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -21,7 +21,7 @@ module EmbedVideosHelper
|
||||
match = link.match(reg_exp)
|
||||
end
|
||||
|
||||
if match and match[2]
|
||||
if match && match[2]
|
||||
'<iframe src="' + src + match[2] + '" style="border:0;" allowfullscreen title="' + title + '"></iframe>'
|
||||
else
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user