Use parentheses

This commit is contained in:
gregoirenovel 2018-12-18 21:29:31 +01:00
parent 9914ebdfe4
commit 026fd1aaa2
4 changed files with 4 additions and 4 deletions

View file

@ -61,7 +61,7 @@ class Admin::GestionnairesController < AdminController
end
def assign_gestionnaire!
if current_administrateur.gestionnaires.include? @gestionnaire
if current_administrateur.gestionnaires.include?(@gestionnaire)
flash.alert = 'Instructeur déjà ajouté'
else
@gestionnaire.administrateurs.push current_administrateur

View file

@ -41,7 +41,7 @@ class FileSizeValidator < ActiveModel::EachValidator
end
def validate_each(record, attribute, value)
if !value.kind_of? CarrierWave::Uploader::Base
if !value.kind_of?(CarrierWave::Uploader::Base)
raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected")
end

View file

@ -4,7 +4,7 @@ class ClamavService
return true
end
FileUtils.chmod 0666, file_path
FileUtils.chmod(0666, file_path)
client = ClamAV::Client.new
response = client.execute(ClamAV::Commands::ScanCommand.new(file_path))

View file

@ -17,7 +17,7 @@ class PiecesJustificativesService
def self.upload_one!(dossier, user, params)
content = params[:piece_justificative][:content]
if ClamavService.safe_file? content.path
if ClamavService.safe_file?(content.path)
pj = PieceJustificative.new(content: content,
dossier: dossier,
type_de_piece_justificative: nil,