Codecast: Getting Started with Rails 7 14: Refactor into Comment Partials @StatelessCode
Codecast: Getting Started with Rails 7 14: Refactor into Comment Partials  @StatelessCode
Uploaded January 2022 | Updated November 2026, 3 hours ago
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 video covers:
00:00:10 Introduction and review of previous episodes
00:02:29 How a test driven approach enables successful refactoring
00:04:03 Refactor the display of each comment into a _comment.html.erb partial
00:08:09 Refactor the comment form into a partial (using local variables instead of instance variables)
00:14:30 Review, 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.
Codecast: Getting Started with Rails 7 14: Refactor into Comment PartialsCreate a RubyGem 92: Add Contributing Guidelines to the ProjectUpgrade a Rails 7 Application to Ruby 3.2.2Codecast: statelesscode.com WordPress 13: Upload Theme and Plugins to Real SiteNerdDice.com Retrospective 3 - The Retro that THEY Dont Want You to SeeChange RuboCop Config to Enable New Cops By Default for a Rails ApplicationCodecast: statelesscode.com WordPress 19: Add Actual Intended Styles to SidebarThe Path to Rails 8 - Upgrade Rails from 7.1 to 7.2Codecast: Create a RubyGem 82: Add method_missing methods to Benchmark ScriptAdd Coveralls to a Rails 7 ProjectMediocre Karaoke - The Long and Winding Road by The BeatlesRails 8 Development with Dev Containers and rails-new
Stateless Code |

Codecast: Getting Started with Rails 7 14: Refactor into Comment Partials

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER