Enable the Layout/LeadingCommentSpace cop

This commit is contained in:
gregoirenovel 2018-01-15 19:14:09 +01:00
parent 19ee24d559
commit 345b892956
10 changed files with 17 additions and 17 deletions

View file

@ -121,7 +121,7 @@ Layout/InitialIndentation:
Enabled: true Enabled: true
Layout/LeadingCommentSpace: Layout/LeadingCommentSpace:
Enabled: false Enabled: true
Layout/MultilineArrayBraceLayout: Layout/MultilineArrayBraceLayout:
Enabled: false Enabled: false

View file

@ -61,7 +61,7 @@ class Admin::GestionnairesController < AdminController
else else
@gestionnaire.administrateurs.push current_administrateur @gestionnaire.administrateurs.push current_administrateur
flash.notice = 'Accompagnateur ajouté' flash.notice = 'Accompagnateur ajouté'
#TODO Mailer no assign_to # TODO Mailer no assign_to
end end
end end
end end

View file

@ -12,7 +12,7 @@ class Users::SessionsController < Sessions::SessionsController
error_procedure error_procedure
end end
#POST /resource/sign_in # POST /resource/sign_in
def create def create
remember_me = params[:user][:remember_me] == '1' remember_me = params[:user][:remember_me] == '1'
try_to_authenticate(User, remember_me) try_to_authenticate(User, remember_me)

View file

@ -1,5 +1,5 @@
class DossierFacades class DossierFacades
#TODO rechercher en fonction de la personne/email # TODO rechercher en fonction de la personne/email
def initialize(dossier_id, email, champ_id = nil) def initialize(dossier_id, email, champ_id = nil)
@dossier = Dossier.find(dossier_id) @dossier = Dossier.find(dossier_id)
@champ_id = champ_id @champ_id = champ_id

View file

@ -1,5 +1,5 @@
class InviteDossierFacades < DossierFacades class InviteDossierFacades < DossierFacades
#TODO rechercher en fonction de la personne/email # TODO rechercher en fonction de la personne/email
def initialize id, email def initialize id, email
@dossier = Invite.where(email: email, id: id).first!.dossier @dossier = Invite.where(email: email, id: id).first!.dossier
end end

View file

@ -11,7 +11,7 @@ class Etablissement < ActiveRecord::Base
end end
def inline_adresse def inline_adresse
#squeeze needed because of space in excess in the data # squeeze needed because of space in excess in the data
"#{numero_voie} #{type_voie} #{nom_voie}, #{complement_adresse}, #{code_postal} #{localite}".squeeze(' ') "#{numero_voie} #{type_voie} #{nom_voie}, #{complement_adresse}, #{code_postal} #{localite}".squeeze(' ')
end end
end end

View file

@ -107,7 +107,7 @@ class Gestionnaire < ActiveRecord::Base
.find_by(gestionnaire: self, dossier: dossier) .find_by(gestionnaire: self, dossier: dossier)
if follow.present? if follow.present?
#retirer le seen_at.present? une fois la contrainte de presence en base (et les migrations ad hoc) # retirer le seen_at.present? une fois la contrainte de presence en base (et les migrations ad hoc)
champs_publiques = follow.demande_seen_at.present? && champs_publiques = follow.demande_seen_at.present? &&
follow.dossier.champs.updated_since?(follow.demande_seen_at).any? follow.dossier.champs.updated_since?(follow.demande_seen_at).any?

View file

@ -65,11 +65,11 @@ class Search < ActiveRecord::Base
Results.new(q) Results.new(q)
end end
#def self.refresh # def self.refresh
# # TODO: could be executed concurrently # # TODO: could be executed concurrently
# # See https://github.com/thoughtbot/scenic#what-about-materialized-views # # See https://github.com/thoughtbot/scenic#what-about-materialized-views
# Scenic.database.refresh_materialized_view(table_name, concurrently: false) # Scenic.database.refresh_materialized_view(table_name, concurrently: false)
#end # end
private private

View file

@ -171,7 +171,7 @@ Rails.application.routes.draw do
end end
namespace :accompagnateurs do namespace :accompagnateurs do
get 'show' #delete after fixed tests admin/accompagnateurs/show_spec without this line get 'show' # delete after fixed tests admin/accompagnateurs/show_spec without this line
end end
resources :gestionnaires, only: [:index, :create, :destroy] resources :gestionnaires, only: [:index, :create, :destroy]

View file

@ -13,21 +13,21 @@ class DeleteDefaultDescriptionToDossier < ActiveRecord::Migration
def up def up
Procedure.all.each do |procedure| 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| TypeDeChamp.where(procedure_id: procedure.id).each do |type_de_champ|
type_de_champ.order_place += 1 type_de_champ.order_place += 1
type_de_champ.save type_de_champ.save
end 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) TypeDeChamp.create(libelle: 'Description', description: 'Description de votre demande', type_champ: 'textarea', order_place: 0, procedure_id: procedure.id, mandatory: true)
end end
Dossier.all.each do |dossier| 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) 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) Champ.create(value: dossier.description, type_de_champ_id: new_type_de_champ.first.id, dossier_id: dossier.id)
end end