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.
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!
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:
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.
Serialization by example
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.
A simple table partitioning example
A simple db partitioning example in postgresql -
An Introduction to Nix for Ruby Developers
Learn how to build and share reproducible Rails development environments:
Building our calendar UI with Rails, Phlex, & Turbo
In this 15-minute video, I’ll show you how I rebuilt our scheduling feature with an interactive calendar, using Phlex, Turbo Frames, and a sprinkle of Alpine.js.
Refactoring, testing and getting the time/money for it
A little bit about how I try to convince our stubborn clients to allow time to refactor and test, specially on legacy projects we inherit [more inside]
Processing Large Jobs
In this episode, we will upload a CSV file but need to pass it into a background job. This can prove to be difficult based on the hosting infrastructure so we’ll explore some mechanisms to work around them. We’ll also look to optimize Solid Queue to handle the large number of jobs.
Using OmniAI to Search LLM Embeddings with Rails and Postgres
OmniAI now supports generating embeddings using Mistral and OpenAI APIs. In conjunction with pgvector, this is an excellent option for indexing and searching data to pass through an LLM prompt within a Ruby on Rails application… [more inside]