Enable the Layout/LeadingCommentSpace cop
This commit is contained in:
parent
19ee24d559
commit
345b892956
10 changed files with 17 additions and 17 deletions
|
@ -13,21 +13,21 @@ class DeleteDefaultDescriptionToDossier < ActiveRecord::Migration
|
|||
|
||||
def up
|
||||
Procedure.all.each do |procedure|
|
||||
#change all type_de_champ place_order by +1 to insert new type_de_champ description on first place
|
||||
# change all type_de_champ place_order by +1 to insert new type_de_champ description on first place
|
||||
TypeDeChamp.where(procedure_id: procedure.id).each do |type_de_champ|
|
||||
type_de_champ.order_place += 1
|
||||
type_de_champ.save
|
||||
end
|
||||
|
||||
#insert type_de_champ description on first place
|
||||
# insert type_de_champ description on first place
|
||||
TypeDeChamp.create(libelle: 'Description', description: 'Description de votre demande', type_champ: 'textarea', order_place: 0, procedure_id: procedure.id, mandatory: true)
|
||||
end
|
||||
|
||||
Dossier.all.each do |dossier|
|
||||
#get the new type de champ
|
||||
# get the new type de champ
|
||||
new_type_de_champ = TypeDeChamp.where(libelle: 'Description', type_champ: 'textarea', order_place: 0, procedure_id: dossier.procedure_id, mandatory: true)
|
||||
|
||||
#create a new champ with the actual description value
|
||||
# create a new champ with the actual description value
|
||||
Champ.create(value: dossier.description, type_de_champ_id: new_type_de_champ.first.id, dossier_id: dossier.id)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue