extract libelle_id_procedures
This commit is contained in:
parent
9ec59669c3
commit
b7af591e8d
1 changed files with 10 additions and 5 deletions
|
@ -13,11 +13,7 @@ module Administrateurs
|
|||
|
||||
def autorisations
|
||||
@name = name
|
||||
@libelle_id_procedures = current_administrateur
|
||||
.procedures
|
||||
.order(:libelle)
|
||||
.pluck(:libelle, :id)
|
||||
.map { |libelle, id| ["#{id} - #{libelle}", id] }
|
||||
@libelle_id_procedures = libelle_id_procedures
|
||||
end
|
||||
|
||||
def securite
|
||||
|
@ -37,6 +33,7 @@ module Administrateurs
|
|||
end
|
||||
|
||||
def edit
|
||||
@libelle_id_procedures = libelle_id_procedures
|
||||
end
|
||||
|
||||
def update
|
||||
|
@ -74,6 +71,14 @@ module Administrateurs
|
|||
EOF
|
||||
end
|
||||
|
||||
def libelle_id_procedures
|
||||
current_administrateur
|
||||
.procedures
|
||||
.order(:libelle)
|
||||
.pluck(:libelle, :id)
|
||||
.map { |libelle, id| ["#{id} - #{libelle}", id] }
|
||||
end
|
||||
|
||||
def all_params
|
||||
[:name, :access, :target, :targets, :networkFiltering, :networks, :lifetime, :customLifetime]
|
||||
.index_with { |param| params[param] }
|
||||
|
|
Loading…
Reference in a new issue