diff --git a/.rubocop.yml b/.rubocop.yml index afdf8f6f4..fa0601957 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -234,7 +234,7 @@ Layout/TrailingBlankLines: Enabled: true Layout/TrailingWhitespace: - Enabled: false + Enabled: true Lint/AmbiguousBlockAssociation: Enabled: false diff --git a/app/models/administrateur.rb b/app/models/administrateur.rb index 18ad7e7ae..7048cb473 100644 --- a/app/models/administrateur.rb +++ b/app/models/administrateur.rb @@ -43,9 +43,9 @@ class Administrateur < ActiveRecord::Base if active? raise "Impossible d'inviter un utilisateur déjà actif !" end - + reset_password_token = set_reset_password_token - + AdministrationMailer.invite_admin(self, reset_password_token).deliver_now! reset_password_token diff --git a/app/models/administration.rb b/app/models/administration.rb index a2e3b56fa..b9805b3cc 100644 --- a/app/models/administration.rb +++ b/app/models/administration.rb @@ -10,7 +10,7 @@ class Administration < ActiveRecord::Base def invite_admin(email) administrateur = Administrateur.new({ email: email, - active: false + active: false }) administrateur.password = administrateur.password_confirmation = SecureRandom.hex