validate api_entreprise_token

This commit is contained in:
Christophe Robillard 2020-07-08 17:00:21 +02:00
parent c074864c2e
commit 2c56511204
7 changed files with 27 additions and 7 deletions

View file

@ -108,6 +108,8 @@ class Procedure < ApplicationRecord
], size: { less_than: 20.megabytes }
validates :logo, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 5.megabytes }
validates :api_entreprise_token, jwt_token: true, allow_blank: true
before_save :update_juridique_required
after_initialize :ensure_path_exists
before_save :ensure_path_exists