[solved] Agile Web Development with Rails 8: Iteration K3 various issues (B3 PDF p. 265-271)

  • Paragraph on p 265, you no longer navigate to http://localhost:3000/admin to login. It’s now http://localhost:3000/session/new (or just try to access the support requests resource and you’ll be redirected there after login)
  • The screenshot at the top of page 266 shows the login prompt instead of the support requests.
  • If you try to access the support requests before you set up ActionText, you’ll get a NoMethodError on the template.
  • The code snippet on pages 264-265 shouldn’t have the conditional about <% if support_request.response.blank? %> yet if the intent is to show the index before the rich text is implemented
  • You need to run a bundle install after bin/rails action_text:install and before bin/rails db:migrate because the ActionText install adds in the image_processing gem.
  • When the <% if support_request.response.blank? %> section is added on pages 267-269, it is duplicated (because it was already there in error in the previous snippet).
  • Update controller method doesn’t use the new params.expect convention. It will also respond irrespective of whether the SupportRequest successfully updates or not.
  • The rich_text_area occurrences in iteration K3 and the reference in the index at the back of the book should be updated to rich_textarea to match current Rails convention and guides.
  • There is a snippet to add SupportRequestMailer.respond(support_request).deliver_now to the update method on page 271, but it was already present (in error) on page 269.
  • This is probably more of an iteration K2 issue, but the inverse relationship to SupportRequest on the Order model (has_many :support_requests, dependent: :nullify) never gets created. I discovered it when I created a SupportRequest fixture that had an order and my other tests started failing.