The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Easier nested layouts in Rails 7
I’ve been using a simple, 4-line helper method to implement nested layouts in Rails since I originally blogged about it in the Rails 4 days. The technique still works great after all these years! Today I updated my post for Rails 7. The code has now been tested from Rails 6.0 all the way to Rails edge. https://mattbrictson.com/blog/easier-nested-layouts-in-rails
Test-driven development in the age of artificial intelligence
Hi friends, I just added new content to Everyday Rails for the first time in nearly two years! Ruby is still my primary language, but sometimes I need to dip my toe into other languages and ecosystems. Here’s how ChatGPT, GitHub Copilot, and TDD made me a professional Go programmer in less than an hour. Kind of. Don’t worry, the post isn’t about Go, it’s about the process.
Ruby on Rails upgrade: "breaking changes" you might not expect
I’m working on a Rails upgrade for a giant monolith application. It’s been a while already, and while I’m encountering many issues trying to jump from 5.2+ right to 6.1, I want to share some of the stories. Link to post.
Your first Stimulus controller — learn Stimulus by building a Toggle
Hey RubyFlow! I’ve just published a beginner’s guide to learning Stimulus. We build a simple toggle controller, and I teach you some core concepts along the way. https://railsnotes.xyz/blog/your-first-stimulus-controller-learn-stimulus-ruby-on-rails-by-building-a-toggle-beginners-guide
3D & Robotics in Dragon Ruby with Kota Weaver | Rubber Duck Dev Show 90
In this episode, we discuss working with 3D and robotics in Dragon Ruby with Kota Weaver: https://www.rubberduckdevshow.com/episodes/90-3d-robotics-in-dragon-ruby-with-kota-weaver/
Glimmer DSL for WX (wxWidgets GUI Toolkit) Using wxruby3
Glimmer gets a new GUI DSL in 2023 called Glimmer DSL for WX (Early Alpha 0.0.5 was built in 1 day) to support the very mature wxWidgets GUI toolkit that renders cross-platform native GUI controls (using a brand new wxruby3 binding)! [more inside]
Using Rails Credentials in your Rails App
Did you know that Rails comes with a built-in credentials manager to replace .env variables? Heres how you can start using it — https://railsnotes.xyz/blog/custom-credentials-in-your-rails-app
If You Liked Shoes, You'll Love Glimmer!
A new Glimmer FAQ (Frequently Asked Questions) section has been added to the Glimmer project README on GitHub in order to answer questions like “How do Glimmer GUI DSLs compare to Shoes?” and “What is the difference between Glimmer and Glimmer DSL for SWT?”, among others. [more inside]
Rails design patterns - the big picture
https://rubyhero.dev/rails-design-patterns-the-big-picture
Rails 7 extends enum support for the Postgres adapter
Renaming the enum, adding and renaming the values of the enum made easier with the latest changes to the Postgres adapter in Rails 7 [more inside]
Tips for writing Rails tasks with Thor instead of Rake
Thor is a great way to write simple CLIs like one-off Rails scripts, but it does have its own gotchas. Here’s how to use Thor in practice. https://mattbrictson.com/blog/rails-tasks-with-thor
Rails Console Tips and Tricks
Some tips and tricks to get the most out of the Rails console. [more inside]
How to get offline documentation for Ruby, Rails and your gems
The latest issue of Rails Tricks is out! It covers how to get offline documentation for Ruby, Rails, and your gems in case you take a laptop on your vacation. https://greg.molnar.io/blog/rails-tricks-issue-11/
Pundit testing approaches compared
I am an old-time CanCanCan user and recently started to consider switching to Pundit. I am also a big fan of RSpec. Given how important Authorization (AuthZ) is, I want to test it properly. [more inside]
Intro to Propshaft: A new asset pipeline for Rails
Explore the future of asset pipelines in Rails with Propshaft! Discover how this cutting-edge technology enhances the management and delivery of assets while simplifying your development workflow. https://www.honeybadger.io/blog/propshaft-tutorial-migration/
The Future of Dragon Ruby with Amir Rajan | Rubber Duck Dev Show 89
In this episode, we discuss the future of Dragon Ruby with Amir Rajan: https://www.rubberduckdevshow.com/episodes/89-the-future-of-dragon-ruby-with-amir-rajan/
[ANN] httpx 0.24.0 released
httpx 0.24.0 has been released. [more inside]
A new release or rails_performance gem
https://github.com/igorkasyanchuk/rails_performance Here are the new features added: [more inside]
Deploying a Rails app with MRSK
I wrote an article about deploying a Rails app to a VPS with MRSK. Using Caddy in front of the Rails server and running a Sidekiq worker on the same host. https://greg.molnar.io/blog/deploying-a-rails-app-with-mrsk/
Setting Up Business Logic with DCI in Rails
In part two of this series, we’ll organize business logic in your Rails application using DCI: https://blog.appsignal.com/2023/06/14/setting-up-business-logic-with-dci-in-rails.html