instructeurs: alias instructeur.email
This also means we need to replace instances of `pluck` on the email column.
This commit is contained in:
parent
cd478b489e
commit
a462edb9bc
10 changed files with 15 additions and 11 deletions
|
@ -28,6 +28,10 @@ class Instructeur < ApplicationRecord
|
|||
Instructeur.eager_load(:user).find_by(users: { email: email })
|
||||
end
|
||||
|
||||
def email
|
||||
user.email
|
||||
end
|
||||
|
||||
def follow(dossier)
|
||||
begin
|
||||
followed_dossiers << dossier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue