Stateless Code | Codecast: Getting Started with Rails 7 05: Show a Single Article @StatelessCode | Uploaded December 2021 | Updated October 2024, 11 hours ago.
This is the 5th video in the Getting Started with Rails 7 series. In this video Mike adds the route, controller action, and view to show a single Article. He also adds testing to cover the functionality and fixes some errors in the previously created fixtures.
This video covers:
00:00:10 Introduction
00:02:08 Add get articles/:id route to articles#show
00:04:15 Update the ArticlesControllerTest for new functionality and iterate through failures. Add as: 'article' to routes to get article_url to get new error
00:09:37 Add show action to ArticlesController
00:10:57 Create show.html.erb to get a failure instead of an error in the test
00:12:02 Find and assign the Article in the show method
00:13:53 Populate the show.html.erb content. We can now display an Article using the show action
00:15:25 Fix the fixture to the the controller test passing
00:18:37 Refactor some test code into the setup method.
00:19:25 Add a link to the Articles index page for each record and remove as: 'article' from routes
00:22:51 Fix error of duplication of article title in the index view
00:24:13 Review changes. Commit and push code.
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
This is the 5th video in the Getting Started with Rails 7 series. In this video Mike adds the route, controller action, and view to show a single Article. He also adds testing to cover the functionality and fixes some errors in the previously created fixtures.
This video covers:
00:00:10 Introduction
00:02:08 Add get articles/:id route to articles#show
00:04:15 Update the ArticlesControllerTest for new functionality and iterate through failures. Add as: 'article' to routes to get article_url to get new error
00:09:37 Add show action to ArticlesController
00:10:57 Create show.html.erb to get a failure instead of an error in the test
00:12:02 Find and assign the Article in the show method
00:13:53 Populate the show.html.erb content. We can now display an Article using the show action
00:15:25 Fix the fixture to the the controller test passing
00:18:37 Refactor some test code into the setup method.
00:19:25 Add a link to the Articles index page for each record and remove as: 'article' from routes
00:22:51 Fix error of duplication of article title in the index view
00:24:13 Review changes. Commit and push code.
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.