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/models/user_spec.rb'
|
||||||
- 'spec/rails_helper.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
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class Legislation::AnnotationsController < ApplicationController
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
if !@process.allegations_phase.open? || @draft_version.final_version?
|
if !@process.allegations_phase.open? || @draft_version.final_version?
|
||||||
render json: {}, status: :not_found and return
|
render(json: {}, status: :not_found) && (return)
|
||||||
end
|
end
|
||||||
|
|
||||||
existing_annotation = @draft_version.annotations.where(
|
existing_annotation = @draft_version.annotations.where(
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module EmbedVideosHelper
|
|||||||
match = link.match(reg_exp)
|
match = link.match(reg_exp)
|
||||||
end
|
end
|
||||||
|
|
||||||
if match and match[2]
|
if match && match[2]
|
||||||
'<iframe src="' + src + match[2] + '" style="border:0;" allowfullscreen title="' + title + '"></iframe>'
|
'<iframe src="' + src + match[2] + '" style="border:0;" allowfullscreen title="' + title + '"></iframe>'
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
|
|||||||
Reference in New Issue
Block a user