Enable Style/UnneededInterpolation

This commit is contained in:
gregoirenovel 2018-10-01 14:03:05 +02:00
parent 82f0df089d
commit ed240cb4d3
7 changed files with 10 additions and 10 deletions

View file

@ -1244,7 +1244,7 @@ Style/UnneededCapitalW:
Enabled: false
Style/UnneededInterpolation:
Enabled: false
Enabled: true
Style/UnneededPercentQ:
Enabled: true

View file

@ -6,7 +6,7 @@ class TypesDeChampService
parameters = params_with_ordered_champs
.require(:procedure)
.permit("#{attributes}" => [
.permit(attributes.to_s => [
:libelle,
:description,
:order_place,

View file

@ -12,7 +12,7 @@ class AddProcedurePathMappingTable < ActiveRecord::Migration
add_foreign_key :procedure_paths, :administrateurs
Procedure.all.each do |procedure|
ProcedurePath.create(path: "#{procedure.id}", procedure_id: procedure.id, administrateur_id: procedure.administrateur.id)
ProcedurePath.create(path: (procedure.id).to_s, procedure_id: procedure.id, administrateur_id: procedure.administrateur.id)
end
end
end

View file

@ -15,7 +15,7 @@ describe Champs::DossierLinkController, type: :controller do
{
dossier: {
champs_attributes: {
'1' => { value: "#{dossier_id}" }
'1' => { value: dossier_id.to_s }
}
},
position: '1'

View file

@ -10,7 +10,7 @@ describe Champs::SiretController, type: :controller do
{
dossier: {
champs_attributes: {
'1' => { value: "#{siret}" }
'1' => { value: siret.to_s }
}
},
position: '1'

View file

@ -165,8 +165,8 @@ describe StatsController, type: :controller do
Dossier.update_all(state: Dossier.states.fetch(:accepte))
@expected_hash = {
"#{2.months.ago.beginning_of_month}" => 3.0,
"#{1.month.ago.beginning_of_month}" => 5.0
(2.months.ago.beginning_of_month).to_s => 3.0,
(1.month.ago.beginning_of_month).to_s => 5.0
}
end
@ -217,8 +217,8 @@ describe StatsController, type: :controller do
Dossier.update_all(state: Dossier.states.fetch(:accepte))
@expected_hash = {
"#{2.months.ago.beginning_of_month}" => 30.0,
"#{1.month.ago.beginning_of_month}" => 50.0
(2.months.ago.beginning_of_month).to_s => 30.0,
(1.month.ago.beginning_of_month).to_s => 50.0
}
end

View file

@ -24,7 +24,7 @@ describe SupportController, type: :controller do
get :index, params: { dossier_id: dossier.id }
expect(response.status).to eq(200)
expect(response.body).to include("#{dossier.id}")
expect(response.body).to include((dossier.id).to_s)
end
end