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.
Phlex Turbo Layouts
Code snippet at shows how to control Turbo meta tags in the head, and in the page, from one place in a Phlex view.
Mastering Iteration in Ruby: for, each, while, until
Creating Custom Enumerable Methods with Ruby Loops
Rails Dashboards that scale – with SQL and dry-struct
Crunch data with SQL, return JSON, wrap it in type-safe DryStructs, and swap in Faker or plug into a data warehouse. Read more
OpenAI and ruby? Yes, we can!
Curious how artificial intelligence and Ruby can work together? Read more
Making Logs Clickable in Rails
I would like to introduce you to my short story about the new Ruby on Rails gem. https://medium.com/@kasvit93/making-logs-clickable-in-rails-599eff931b8f And link to the gem directly. https://github.com/Kasvit/clickable_logger
🚀 New Article: Mastering Ruby’s zip Method
If you work with arrays in Ruby, there’s one method you must have in your toolbox: zip. I just published a quick deep dive on how zip can help you: Read more
Hotwire components that refresh themselves
Using ViewComponents that know how to refresh themselves via turbo_streams is a powerful pattern to build complex flows with Hotwire Read more
Dependent Select
In this episode, we explore how to enhance standard select fields using a JavaScript library together with StimulusJS to create more dynamic and responsive dropdowns. The focus is on adding search functionality, handling dependent selections, and integrating smoothly with modern frontend setups.
Breaking the Singleton: How to Reload Ruby Singleton Instance
Ruby’s Singleton module has an undocumented method that lets you reload instances. Here’s how I used it to fix my Rails tests -
Capture Browser Console Logs in Rails System Tests with Capybara and Cuprite
Capturing browser console.log output in Rails system tests isn’t obvious with Capybara + Cuprite - especially when debugging timing issues that only show up at full speed. Here’s how to do it
Anyone interested in a SF Ruby vibe coding hackathon this month?
SF Ruby vibe coding hackathon at Sentry HQ is just 2 weeks away! The $3,000 prize is sponsored by Fly.io, Continue, Evil Martians. Rails is known as the go-to tool for solo devs. Does AI take it to the next level? RSVP here.
Open file with source code from a crash page
- with this gem, you can open a file in an editor directly from the crash page. Also, plan to make a PR into Rails, hope it will be merged.
🚀 Clean Ruby. Powerful Hash Transformations.
Ever needed to convert an array into a hash without messy loops? Ruby gives us two elegant tools for that: index_by and index_with. Read more
Mastering Ruby’s String Split(): with Examples
Making Sure FactoryBot Builds Without Creating
An RSpec spec to verify FactoryBot.build doesn’t interact with the DB:
Active Record adds support for deprecating associations
Rails 8 lets you deprecate Active Record associations, making it easier to phase them out gradually while keeping them around to safely track and remove their usage. Read more
🔍 El que busca, encuentra — and Ruby proves it.
In my latest article, I explore how Ruby handles search operations across arrays, hashes, and other collections. From expressive methods like .find, .select, and .grep, to efficient algorithms like .bsearch, Ruby empowers developers to write clear and intentional code when looking for what matters. Read more
Think before you cache
Explore caching strategies and tools in Rails, from low-level manual caching to popular tools and gems that make caching easier. We’ll learn how to identify effective caching opportunities and avoid common pitfalls. Read more
OasRails: From a Rails Engine to a Framework-Agnostic Solution
Ruby is not just Rails, which is why I split my gem for API documentation, and now it could work with multiple frameworks. Read more
🔧 Tired of deeply nested routes in Rails?
If you’re working with complex model relationships in Rails, shallow: true might be the clean solution you’re looking for. In my latest article, I explore how this simple option helps reduce route depth, simplify controller logic, and keep your code RESTful and maintainable — without losing model structure. Read more
🧾 New Post: Making Accessible PDFs with Ruby (PAC 2024 Edition)
Generating PDF/UA-compliant PDFs? Not as easy as flipping a flag. In this post, I document the battle with PAC 2024, Chrome quirks, and missing metadata—and how I used (and built) Ruby tools to fix it. Read more