instructeurs: replace calls to Instructeur.find_by(email: …)
This commit is contained in:
parent
c14dc7ad64
commit
cd478b489e
9 changed files with 15 additions and 11 deletions
|
@ -50,7 +50,7 @@ class Avis < ApplicationRecord
|
|||
private
|
||||
|
||||
def try_to_assign_instructeur
|
||||
instructeur = Instructeur.find_by(email: email)
|
||||
instructeur = Instructeur.by_email(email)
|
||||
if instructeur
|
||||
self.instructeur = instructeur
|
||||
self.email = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue