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.
Data Modeling Entitlements and Pricing for SaaS Applications
Thorough write up of how to data model entitlements, pricing and versioned pricing to allow for flexibility in changing pricing over time in a SaaS. [more inside]
Arguments for making the private method work on constants
I wrote about why I think we should make the private method work on constants in Ruby. I explore there some idea about how this will improve code readability and how will open the case for defining private (sub) classes
RubyConf 2024 Workshop Accepted - How To Build Basic Desktop Applications in Ruby
Glimmer will be returning to RubyConf in 2024 at the Windy City (Chicago, Illinois, USA)! My RubyConf 2024 2-hour workshop proposal “How To Build Basic Desktop Applications in Ruby” has been accepted! [more inside]
Squash Your Ruby and Rails Bugs Faster
Let’s look at a few readily available techniques and tools to gather and investigate issues in your Ruby or Rails app: https://blog.appsignal.com/2024/08/21/squash-your-ruby-and-rails-bugs-faster.html
Building a better bin/dev script
The Rails 7.2 bin/dev script uses the foreman gem for process management, which has serious limitations when it comes to interactive debugging. This article explores a solution using run-pty, an interactive process manager that is an easy-to-use alternative to foreman, concurrently, overmind, tmux, and other tools. https://mattbrictson.com/blog/better-bin-dev-script
Filterameter Goes 1.0!
What if you could increase readability and reduce boilerplate code at the same time as you simplified and sped development of Rails controllers? Sound too good to be true?!? It’s not, it’s Filterameter. [more inside]
Creating a REST API with Ruby on Rails. Chapter 3: Authentication and Authorization.|
This is a basic guide for people that is starting to build APIs with Rails. Read more here
Using OmniAI to Standardize LLM Prompts with Tools
OmniAI now supports tools for LLM integrations using Anthropic, Google, Mistral, and OpenAI. This helps standardize preparing and executing tool calls with Ruby! [more inside]
Railing against time: tools and techniques that got us 5X faster tests
A look at how Evil Martians recently helped a client optimize their CI pipeline and test and change their code faster, ultimately getting five times faster results. Stackprof and TestProf to the rescue. Railing against time: tools and techniques that got us 5X faster tests
Build a modal form with Rails, Turbo, and the dialog element
How to practically apply Turbo Frames and Turbo Streams using a gradual, layered approach on top of standard Rails scaffolding. There are many ways to accomplish modals in Rails, but this approach feels the most “Rails-y” to me. Only one line of JavaScript needed! https://mattbrictson.com/blog/turbo-modal
Why you should participate to Friendly.rb in September 2024
I wrote about why participate to Friendly.rb conference. It is more about why participate to smaller conferences with just some hints about what I like about Friendly.rb
Rails API Quiz
Ruby on Rails API Quiz - test your knowledge with 10 random questions. See how many questions can you get right and challenge your friends!
An Introduction to HTTP Caching in Ruby On Rails
We’ll explore the basics of HTTP caching, cache layers, configuration, and how to cache in Rails: https://blog.appsignal.com/2024/08/14/an-introduction-to-http-caching-in-ruby-on-rails.html
The SDK Imperative: why developer tools live or die by their SDKs
Dev tools can only be as good as their SDKs. We realized this when optimizing the NATS Ruby client, ultimately getting a 3X faster SDK. So, here’s how and why to treat SDKs as first-class citizens in the world of developer-facing tools: The SDK Imperative: why developer tools live or die by their SDKs
Rails 7.2 Upgrade Problems (of my own making)
I recently updating my Rails applications to 7.2 and ran into a few issues. Based on the experienced errors, the solutions weren’t obvious. https://blog.driftingruby.com/rails-7-2-upgrade-problems-of-my-own-making/
Serialization by example
https://railsexamples.com/serializers-in-rails/ When building APIs with Ruby on Rails, serializers play a pivotal role in data transformation and presentation. They serve as the crucial intermediary between complex Ruby objects and the streamlined JSON that your API serves to clients. Let’s take deep dive -
How to Render CSS Dynamically in Rails
In the latest post from Joy of Rails, learn some techniques and considerations for rendering CSS on-the-fly with Ruby on Rails. [more inside]
Introduction to Minitest Mocks
If you are team Minitest you might have already used mocks, but if you come from RSpec you might wonder how is mocking done in Minitest.