Prepare to drop columns

This commit is contained in:
Paul Chavard 2019-09-17 10:16:52 +02:00
parent b32b12afbb
commit 88842918f9
8 changed files with 8 additions and 8 deletions

View file

@ -1,6 +1,5 @@
class Administrateur < ApplicationRecord
self.ignored_columns = ['features']
self.ignored_columns = ['features', 'encrypted_password', 'reset_password_token', 'reset_password_sent_at', 'remember_created_at', 'sign_in_count', 'current_sign_in_at', 'last_sign_in_at', 'current_sign_in_ip', 'last_sign_in_ip', 'failed_attempts', 'unlock_token', 'locked_at']
include EmailSanitizableConcern
include ActiveRecord::SecureToken

View file

@ -1,5 +1,5 @@
class Attestation < ApplicationRecord
self.ignored_columns = ['pdf']
self.ignored_columns = ['pdf', 'content_secure_token']
belongs_to :dossier

View file

@ -1,5 +1,5 @@
class AttestationTemplate < ApplicationRecord
self.ignored_columns = ['logo', 'signature']
self.ignored_columns = ['logo', 'signature', 'logo_secure_token', 'signature_secure_token']
include ActionView::Helpers::NumberHelper
include TagsSubstitutionConcern

View file

@ -1,5 +1,5 @@
class Commentaire < ApplicationRecord
self.ignored_columns = ['file']
self.ignored_columns = ['file', 'piece_justificative_id']
belongs_to :dossier, inverse_of: :commentaires, touch: true

View file

@ -1,4 +1,5 @@
class Dossier < ApplicationRecord
self.ignored_columns = ['json_latlngs']
include DossierFilteringConcern
enum state: {

View file

@ -1,5 +1,5 @@
class Instructeur < ApplicationRecord
self.ignored_columns = ['features']
self.ignored_columns = ['features', 'encrypted_password', 'reset_password_token', 'reset_password_sent_at', 'remember_created_at', 'sign_in_count', 'current_sign_in_at', 'last_sign_in_at', 'current_sign_in_ip', 'last_sign_in_ip', 'failed_attempts', 'unlock_token', 'locked_at']
include EmailSanitizableConcern
has_and_belongs_to_many :administrateurs

View file

@ -1,7 +1,7 @@
require Rails.root.join('lib', 'percentile')
class Procedure < ApplicationRecord
self.ignored_columns = ['logo']
self.ignored_columns = ['logo', 'logo_secure_token']
MAX_DUREE_CONSERVATION = 36

View file

@ -1,4 +1,5 @@
class Service < ApplicationRecord
self.ignored_columns = ['siret']
has_many :procedures
belongs_to :administrateur
@ -17,7 +18,6 @@ class Service < ApplicationRecord
validates :nom, presence: { message: 'doit être renseigné' }, allow_nil: false
validates :nom, uniqueness: { scope: :administrateur, message: 'existe déjà' }
validates :organisme, presence: { message: 'doit être renseigné' }, allow_nil: false
validates :siret, length: { is: 14, message: 'doit être une suite de 14 chiffres' }, allow_nil: true
validates :type_organisme, presence: { message: 'doit être renseigné' }, allow_nil: false
validates :email, presence: { message: 'doit être renseigné' }, allow_nil: false
validates :telephone, presence: { message: 'doit être renseigné' }, allow_nil: false