Open werebus opened 7 months ago
https://github.com/umts/incidents/blob/583ec9160e7e053b7b94bf4949cc622bc8a36cd1/app/views/incident_reports/history.haml#L15
https://github.com/umts/incidents/blob/583ec9160e7e053b7b94bf4949cc622bc8a36cd1/app/views/supervisor_reports/history.haml#L15
User.find('4').try(:name) #=> nil # Hmmm... User.find('4')&.name # `method_missing': undefined method `name' for #<User id: 4, ...
All user "names" are nil, because users don't have "names".
nil
Likewise when the user is changed:
https://github.com/umts/incidents/blob/583ec9160e7e053b7b94bf4949cc622bc8a36cd1/app/views/incident_reports/_changes.haml#L23
https://github.com/umts/incidents/blob/583ec9160e7e053b7b94bf4949cc622bc8a36cd1/app/views/supervisor_reports/_changes.haml#L23
https://github.com/umts/incidents/blob/583ec9160e7e053b7b94bf4949cc622bc8a36cd1/app/views/incident_reports/history.haml#L15
https://github.com/umts/incidents/blob/583ec9160e7e053b7b94bf4949cc622bc8a36cd1/app/views/supervisor_reports/history.haml#L15
All user "names" are
nil
, because users don't have "names".