-
Getting Started with Rails 7 Episode 18: Destroy Comments with Turbo
This is the 18th video in the Getting Started with Rails 7 series. In this video Mike adds the ability to delete comments. Similar to article deletion, he needs to make sure the Turbo confirm and :see_other status are configured correctly. In order to test this he uses browser-driven Rails system tests. This video covers:…
-
Getting Started with Rails 7 Episode 17: Refactor Tests
This is the 17th video in the Getting Started with Rails 7 series. In this video Mike refactors the existing tests to move shared tests between models to a helper module that both test classes include. In addition, he creates a method to test that all fixtures are valid for each model. After that, he…
-
Codecast: Getting Started with Rails 7 Episode 16: Refactor Repeated Code Using Concerns
This is the 16th video in the Getting Started with Rails 7 series. In this video Mike refactors the code written in the last video into a module called Visible that extends ActiveSupport::Concern. This module becomes the new home for the status-related code for both articles and comments. The two models both include the Visible…
-
Getting Started with Rails 7 Episode 15: Prepare for Concerns
This is the 15th video in the Getting Started with Rails 7 series. In this video Mike provides an overview of modules, mixins, and concerns. Then he sets up a status field that has duplicated functionality between the Article and the Comment. In this episode he gets everything set up and working so that he…
-
Getting Started with Rails 7 Episode 14: Refactor into Comment Partials
This is the 14th video in the Getting Started with Rails 7 series. In this video Mike starts section 9 of the Getting Started guide on refactoring. He makes use of the previously introduced concept of partials to refactor the comment display and the comment form into partials that the articles show view renders. This…
-
Getting Started with Rails 7 Episode 13: Create Comments for an Article
This is the 13th video in the Getting Started with Rails 7 series. In this video Mike generates the CommentsController and adds a nested resource form to the articles show view. Then he updates the app with functionality for creating and displaying comments. This video covers: The code for this series is open source and…
-
Getting Started with Rails 7 Episode 12: Add a Model and Route for Comments
This is the 12th video in the Getting Started with Rails 7 series. In this video Mike uses the Rails model generator to generate a model for comments on articles. He reviews the generated code, tweaks a couple of associations, customizes the fixtures, adds a nested route for comments. At the end, he re-runs the…
-
Codecast: Getting Started with Rails 7 Episode 11: Use a Scaffold Generator to Quickly Produce a Resource
“Do you mean to tell me that we could have done all the work from the previous ten videos in half an hour?!” Yes. (But the purpose of the Getting Started with Rails guide is education, so it slowed things down, added them in incrementally, and explained them.) This is the 11th video in the…
-
Getting Started with Rails 7 Episode 9: Update an Article and Use Form Partials
This is the 9th video in the Getting Started with Rails 7 series. In this video Mike implements the edit and update actions, refactors repeated form code from the new and edit views into a form view partial, and refactors repeated code in the ArticlesControllerTest into shared assertion helper methods. This video covers: The code…
-
Getting Started with Rails 7 Episode 8: Model Validations and Form Error Messages
This is the 8th video in the Getting Started with Rails 7 series. In this video Mike demonstrates that you can currently create an Article record with an empty title and body. In order to solve the problem, he uses Rails model validations to ensure the data for the Article record is in good order…