Turbo (Native), Stimulus, and Strada news and code.
Subscribe to the Hotwire dev newsletter.
Less than 3 weeks until Rails Conf! Do you have your ticket? If you’re attending make sure to read up on the COVID safety requirements for the conference as you will need to get tested before attending.
Outside of the talks and workshops there are also a few unofficial events going on, including a volunteer event and a board game night. Check out Mike Perham’s event page for more details.
I’m excited to meet so many online friends IRL for the first time. If you see me then come say hi! I look a lot like that photo above. 😃
A monster of a tutorial on recreating a very dynamic website, Notion. This is the first episode of many as Dr Nic walks through his development setup, getting the project set up, and the first steps towards building a version of the note taking app. Bonus, he uses Jumpstart Pro to skip a lot of scaffolding!
Filtering and pagination via Hotwire has been covered a lot on this newsletter. But never before has it been consolidated to a 5 minute video.
The folks from Avo, an open source Rails admin gem, peel back the curtain and cover how they DRY up their Turbo Frame code. Instead of using (many) partials, they take advantage of a
BaseController to handle resource-specific querying and rendering.
Andrea made her 43 lesson course completely free! Learn how to progressively enhance your application building a real-time forum that goes beyond a simple Hotwire chat demo.
Scopes can be hard to test because you are usually operating them against the entire test database. Konnor cleans things up and makes the tests much easier to read by introducing a tiny bit of dependency injection.
Kattya works through a few polymorphic queries that get progressively more complex. Each one is benchmarked for speed and memory. There is also a video recording of a talk on the same subject from a recent WNB.rb meetup.
Another ~5 minute video this month from the Mix & Go channel, this time on flash messages. I knew about
flash.now before, but
flash.keep was new to me!
If you like to follow along as someone live codes then this video is for you. It might be less polished than some other videos in this newsletter, but it has that “real” feel of someone figuring it out as they go. Personally, I find the speed of these kind of videos easier to follow.
🙋♂️ Some personal updates
After many years of FactoryBot and RSpec I finally converted to test fixtures and minitest. Here’s my sane approach to test fixtures in Rails.
Also, I was on the Ruby on Rails podcast! We covered what it’s like to build railsdevs in public.
P.S. The Hotwire dev newsletter is accepting sponsorships and job postings! Email me if you're interested in reaching a dedicated group of Ruby on Rails developers.