Merge pull request #8071 from demarches-simplifiees/update_team_members
feat(manager): affiche les utilisateurs de l'équipe en fonction de la valeur dans l'attribut
This commit is contained in:
commit
00139af693
2 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,8 @@ module Manager
|
|||
class TeamAccountsController < Manager::ApplicationController
|
||||
def index
|
||||
@records_per_page = params[:records_per_page] || "10"
|
||||
resources = User.marked_as_team_account
|
||||
resources = User
|
||||
.where(team_account: true)
|
||||
.order(created_at: :asc)
|
||||
.page(params[:_page])
|
||||
.per(@records_per_page)
|
||||
|
|
|
@ -62,7 +62,6 @@ class User < ApplicationRecord
|
|||
accepts_nested_attributes_for :france_connect_information
|
||||
|
||||
default_scope { eager_load(:instructeur, :administrateur, :expert) }
|
||||
scope :marked_as_team_account, -> { where('email ilike ?', "%@beta.gouv.fr") }
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
|
||||
validate :does_not_merge_on_self, if: :requested_merge_into_id_changed?
|
||||
|
|
Loading…
Reference in a new issue