Fix Style/AndOr rubocop issue and remove from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-16 00:32:58 +02:00
parent 256eb682d0
commit 25e501c668
3 changed files with 2 additions and 10 deletions

View File

@@ -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.

View File

@@ -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(

View File

@@ -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
''