Administrateur can be select dynamically the activation of api carto modules
This commit is contained in:
parent
8130e7d155
commit
0e3bec7f9f
17 changed files with 186 additions and 25 deletions
|
@ -1,7 +1,7 @@
|
|||
class ModuleAPICarto < ActiveRecord::Base
|
||||
enum name: {'quartiers_prioritaires' => 'quartiers_prioritaires'}
|
||||
|
||||
belongs_to :procedure
|
||||
|
||||
validates :name, presence: true, allow_blank: false, allow_nil: false
|
||||
validates :use_api_carto, presence: true, allow_blank: true, allow_nil: false
|
||||
validates :quartiers_prioritaires, presence: true, allow_blank: true, allow_nil: false
|
||||
validates :cadastre, presence: true, allow_blank: true, allow_nil: false
|
||||
end
|
||||
|
|
|
@ -2,9 +2,10 @@ class Procedure < ActiveRecord::Base
|
|||
has_many :types_de_piece_justificative
|
||||
has_many :types_de_champ
|
||||
has_many :dossiers
|
||||
has_many :module_api_cartos
|
||||
has_one :module_api_carto
|
||||
accepts_nested_attributes_for :types_de_champ,:reject_if => proc { |attributes| attributes['libelle'].blank? }, :allow_destroy => true
|
||||
accepts_nested_attributes_for :types_de_piece_justificative, :reject_if => proc { |attributes| attributes['libelle'].blank? }, :allow_destroy => true
|
||||
accepts_nested_attributes_for :module_api_carto
|
||||
belongs_to :administrateur
|
||||
|
||||
validates :libelle, presence: true, allow_blank: false, allow_nil: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue