Enable Style/WordArray

This commit is contained in:
gregoirenovel 2018-10-01 13:55:12 +02:00
parent d1439f8a52
commit 6eeba14885
19 changed files with 23 additions and 22 deletions

View file

@ -28,7 +28,7 @@ class TypeDeChampDecorator < Draper::Decorator
end
def base_classes
%w(btn btn-default form-control fa)
['btn', 'btn-default', 'form-control', 'fa']
end
def display_up_button?(index, private)

View file

@ -23,7 +23,7 @@ class TypeDePieceJustificativeDecorator < Draper::Decorator
end
def base_classes
%w(btn btn-default form-control fa)
['btn', 'btn-default', 'form-control', 'fa']
end
def display_up_button?(index)

View file

@ -2,6 +2,6 @@ module StringToHtmlHelper
def string_to_html(str)
html_formatted = simple_format(str)
with_links = html_formatted.gsub(URI.regexp, '<a target="_blank" href="\0">\0</a>')
sanitize(with_links, attributes: %w(href target))
sanitize(with_links, attributes: ['href', 'target'])
end
end

View file

@ -174,7 +174,7 @@ class DossierFieldService
end
def assert_valid_order(order)
if !%w[asc desc].include?(order)
if !["asc", "desc"].include?(order)
raise "Invalid order #{order}"
end
end

View file

@ -21,7 +21,7 @@ class AttestationTemplateLogoUploader < BaseUploader
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
def extension_white_list
%w(jpg jpeg png)
['jpg', 'jpeg', 'png']
end
def filename

View file

@ -21,7 +21,7 @@ class AttestationTemplateSignatureUploader < BaseUploader
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
def extension_white_list
%w(jpg jpeg png)
['jpg', 'jpeg', 'png']
end
def filename

View file

@ -14,7 +14,7 @@ class CommentaireFileUploader < BaseUploader
end
def extension_white_list
%w(pdf doc docx xls xlsx ppt pptx odt ods odp jpg jpeg png zip txt)
['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', 'jpg', 'jpeg', 'png', 'zip', 'txt']
end
def accept_extension_list

View file

@ -19,7 +19,7 @@ class PieceJustificativeUploader < BaseUploader
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
def extension_white_list
%w(pdf doc docx xls xlsx ppt pptx odt ods odp jpg jpeg png)
['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', 'jpg', 'jpeg', 'png']
end
def filename

View file

@ -21,7 +21,7 @@ class ProcedureLogoUploader < BaseUploader
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
def extension_white_list
%w(jpg jpeg png)
['jpg', 'jpeg', 'png']
end
def filename