Allow instructeur to have multiple agent_connect_information
AC will return two different sub depending of the domain demarches.gouv.fr or ds. Both agent_connect_information are stored and the corresponding instructeur is found by its email. We do not store anymore the agent_connect_id on the instructeur as the are many.
This commit is contained in:
parent
2f6147308c
commit
ca17524559
3 changed files with 36 additions and 11 deletions
|
@ -1,8 +1,10 @@
|
|||
class Instructeur < ApplicationRecord
|
||||
self.ignored_columns += [:agent_connect_id]
|
||||
|
||||
include UserFindByConcern
|
||||
has_and_belongs_to_many :administrateurs
|
||||
|
||||
has_one :agent_connect_information, dependent: :destroy
|
||||
has_many :agent_connect_information, dependent: :destroy
|
||||
|
||||
has_many :assign_to, dependent: :destroy
|
||||
has_many :groupe_instructeurs, -> { order(:label) }, through: :assign_to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue