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
|
def autorisations
|
||||||
@name = name
|
@name = name
|
||||||
@libelle_id_procedures = current_administrateur
|
@libelle_id_procedures = libelle_id_procedures
|
||||||
.procedures
|
|
||||||
.order(:libelle)
|
|
||||||
.pluck(:libelle, :id)
|
|
||||||
.map { |libelle, id| ["#{id} - #{libelle}", id] }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def securite
|
def securite
|
||||||
|
@ -37,6 +33,7 @@ module Administrateurs
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
@libelle_id_procedures = libelle_id_procedures
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
@ -74,6 +71,14 @@ module Administrateurs
|
||||||
EOF
|
EOF
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def libelle_id_procedures
|
||||||
|
current_administrateur
|
||||||
|
.procedures
|
||||||
|
.order(:libelle)
|
||||||
|
.pluck(:libelle, :id)
|
||||||
|
.map { |libelle, id| ["#{id} - #{libelle}", id] }
|
||||||
|
end
|
||||||
|
|
||||||
def all_params
|
def all_params
|
||||||
[:name, :access, :target, :targets, :networkFiltering, :networks, :lifetime, :customLifetime]
|
[:name, :access, :target, :targets, :networkFiltering, :networks, :lifetime, :customLifetime]
|
||||||
.index_with { |param| params[param] }
|
.index_with { |param| params[param] }
|
||||||
|
|
Loading…
Add table
Reference in a new issue