You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fails (because of e.g. #337), session[:user_id] ends up being nil — #create returns the un-persisted object on failure. And so, in the call to set_current_user leaves @current_usernil:
Because of a long chain of
nil
buck-passing, A person submitting an application whose user information is invalidException
If the attempt to create a user here:
jobapps/app/controllers/application_submissions_controller.rb
Lines 118 to 119 in a7117f5
fails (because of e.g. #337),
session[:user_id]
ends up beingnil
—#create
returns the un-persisted object on failure. And so, in the call toset_current_user
leaves@current_user
nil
:jobapps/app/controllers/application_controller.rb
Lines 48 to 55 in a7117f5
So,
nil
gets passed to the mailer when we try to email subscribers:jobapps/app/controllers/application_submissions_controller.rb
Line 19 in a7117f5
jobapps/app/mailers/jobapps_mailer.rb
Lines 18 to 23 in a7117f5
jobapps/app/views/jobapps_mailer/application_notification.text.erb
Line 5 in a7117f5
Needless to say, validation problems should send the user back to correct them, not cause a 500 (even if this particular validation failure is 🐮
The text was updated successfully, but these errors were encountered: