User: eager load instructeur and administrateur to remove 2 db requests per http request
This commit is contained in:
parent
5143d341ec
commit
3e0f1b9c66
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,8 @@ class User < ApplicationRecord
|
|||
|
||||
accepts_nested_attributes_for :france_connect_information
|
||||
|
||||
default_scope { eager_load(:instructeur, :administrateur) }
|
||||
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
|
||||
# Callback provided by Devise
|
||||
|
|
Loading…
Reference in a new issue