Agile Web Development with Rails 7: SupportRequestMailer.respond called before created (page 264) [solved]


On page 264 SupportRequestsController#update is defined, and it includes a call to SupportRequestMailer.respond. However, SupportRequestMailer has not been created yet. We’re asked on that page to try out #update, but when we do we don’t get the page refreshed as the book says; instead we get an error that SupportRequestMailer.respond is not defined. (But the update is saved to the record.)

On page 266, we’re instructed to add a call to SupportRequestMailer.respond to SupportRequestsController#update. The intent seems to be that it is not added on page 264, only on page 266, after SupportRequestMailer is defined.

Fixed. Thanks!