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.
ActiveRecord::Base#pluck adds support for hash values in Rails 7.2
ActiveRecord pluck and pick can accept hash values for specifying columns from Rails 7.2
Animate Filtering Data in HOTWire
We can progressively enhance the filtering search. We can dig deeper into Turbo events and get a very satisfying animation of Todos disappearing when they’re filtered out, and reappearing when they are back in the list.
Should You Use Ruby on Rails or Hanami?
Let’s explore the strengths and weaknesses of Rails and Hanami:
Shipping Rails logs with Kamal and Vector
You’ve deployed your Rails app with Kamal, but now what? How do you know what’s happening under the hood? You can tail your logs on the server (otherwise known as hard mode), but there’s a better way: ship them off-site with Vector!
The dangers of single line regular expressions
Regular expressions in Ruby are multi-line by default and if you don’t know that, it might lead to unexpected behavior and security issues. In this article we go over a HackTheBox challenge to demonstrate how it could lead to a vulnerability. Read more
List all rake tasks (with and without description)
A short tip on how to list the rake tasks without description Read more
Open Source Project to Deploy Rails 7 Apps
Deploy Rails 7 app using Capistrano to EC2 instance. Checkout HiveGrid
Introducing Filterameter
This gem provides declarative filter parameters for Rails, enabling filters in query classes or controllers to increase readability and reduce boilerplate code. Read more
Ruby is Your Ally to Become a Rails Ninja!
Learning Ruby isn’t just recommended; it’s essential for mastering the full power of Rails:
A Quick Guide to Ruby's Time and DateTime Classes
A Quick Guide to Ruby’s Time and DateTime Classes
authenticate_by: Prevent timing-based enumeration of users.
Hello. I wrote a little blog post about this interesting function introduced in Rails 7.1. I hope someone enjoy it. Read more
You are what you see
The Rubyist schwad reflects on the community and how what you see reflects who you are Read more
RailsConf 2024 Countdown — Behind the Scenes with Kevin Murphy
📣 The latest Ruby for All episode is now available! Read more
New version of DnsMock has been released 🚀
Added ability to interact with DNS message question/answer context. Mimic any DNS records for your test environment and even more:
Delegated types in Rails: I tried them, and I'm not sure I really understood them.
Developers have been scratching their head trying to figure out delegated types for ages. Today, I want to share a real-world use case. I’ll walk you through my pre-existing domain architecture, my initial requirements, my mistakes, how I eventually used delegated types, what I learned and my open questions.
New SudoRails version has been released 🚀 Sudo mode for your Rails controllers 🔒
Protect any Rails action with a customizable password confirmation. 🙇 Inspired by GitHub Sudo mode. Read more
Handling Exceptions in Grape for Ruby
Let’s explore the basics of Grape exception handling, including customizing exceptions:
The tale of an XSS in Phlex
I reported an XSS to Phlex yesterday and since it was pretty quickly fixed, I wrote a post about it:
Scaffolding in Ruby on Rails
Scaffolding in Ruby on Rails
Introducing Janus a read/write proxy for ActiveRecord 7.1+
Janus is a read/write split proxy for MySQL/ActiveRecord 7.1+. It works by sending any read queries to a replica, and any write queries to the primary database server. If there’s been a write statement within the same thread we stick any future queries to the primary server unless the developer specifically chooses not to. Read more
Create a MacOS desktop application with pure Ruby (Tutorial)
This is (for now) a modest step-by-step tutorial about creating a MacOS desktop application with Ruby. Read more
FactoryBot: the secret weapon called @overrides
Working with many-to-many associations in factories is hard, and @overrides is one way how to deal with it. Read more