instructeurs: alias instructeur.email

This also means we need to replace instances of `pluck` on the email
column.
This commit is contained in:
Pierre de La Morinerie 2019-10-15 16:32:18 +00:00
parent cd478b489e
commit a462edb9bc
10 changed files with 15 additions and 11 deletions

View file

@ -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