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.
Why use Presenters than Components OR Integerate Them Together
This article covers a) What are Presenters? b) Why use Presenters c) Presenters vs Components d) How to Implement Presenters e) Presenters vs Decorators. For Rails newbies these are very confusing thus this article removes this confusion and helps new Ruby on Rails developers to learn how to properly architect their Rails 8 apps. Read it here - Why use Presenters than Components OR Integerate Them Together.
Montreal.rb May 2024 - Hotwire Turbo in Rails: Drive, Frames and Streams
The video of the Montreal.rb May 2024 talk “Hotwire Turbo in Rails: Drive, Frames and Streams” by Helmer Davila has been finally posted on YouTube: https://www.youtube.com/watch?v=rmsBVsZUHzI&list=PLRAf4zt5oEjc2mqmEN9m_O0JovQCXxvxt&index=13 [more inside]
Argon2id: Ruby bindings to Argon2
The first public release of new, native, pre-compiled Ruby bindings to the reference C implementation of Argon2, the password-hashing function that won the 2015 Password Hashing Competition: https://github.com/mudge/argon2id [more inside]
Hotwire and HTMX - Same Principles, Different Approaches
I’m an experienced Hotwire user and I also recently read the book by HTMX authors. I found some interesting similarities and differences between the two: Hotwire and HTMX - Same Principles, Different Approaches
The Basics of Rack for Ruby
Rack is the foundation for every popular Ruby web framework in existence. In the first part of a three-part series, let’s set up a Rack app: https://blog.appsignal.com/2024/10/30/the-basics-of-rack-for-ruby.html
How I upgraded my pet project from Rails 7 to Rails 8 in 30 minutes
A step by step description of the upgrade with links to the project itself and commits
Turbo Frames in Rails: A Complete Guide to Lazy-Loaded Components
This article Turbo Frames in Rails: A Complete Guide to Lazy-Loaded Components is the continuation of the previous article on ViewComponent vs Phlex vs Partials.
A practical GitHub Actions pipeline example with Rails
Continuous integration (CI) pipelines are an important part of building and deploying reliable software. Here’s how to set up a GitHub Actions pipeline for Rails.
ruby -run
Ruby is well known as a language that is easy to use from the surface, but is very deep and complex underneath. That’s what we know and love about it as a language, but its standard library has a similar design and as such it contains many hidden gems. One of the gems I’ve learned about recently is un. [more inside]
Guide: Use a Single Form to Create Multiple Nested Models (at once)
How to handle multi-level nested forms, with a StimulusJS solution to add new child items. It uses nested attributes. [more inside]
ViewComponent vs Phlex vs Partials
I have been using Partials since I started programming in Rails in 2005. ViewComponent and Phlex remind me of React Components making an HTML chunk re-usable. Well, partials do the same. Read the full article here - ViewComponent vs Phlex vs Partials: A Comprehensive Comparison in Ruby on Rails.
HexaPDF 1.0.0 released
After 10 years of working on HexaPDF, I released version 1.0.0. The news entry contains the short list of changes and what’s next.
The Unicode::Emoji::REGEX now supports unqualified Emoji sequences
Unqualified refers to recommended Emoji sequences that miss the special codepoint U+FE0F (Variation Selector 16) . For example, the Emoji “man golfing” can appear in all three forms: [more inside]
Russian Doll Caching in Rails: A Complete Guide to Fragment Caching Optimization
Using caching on modern web apps is very important. And, when you have nested records then fragment cache is the saviour. Read Russian Doll Caching in Rails: A Complete Guide to Fragment Caching Optimization.
rubocop-obsession: A RuboCop extension focused on higher-level code concepts
rubocop-obsession is a collection of RuboCop cops that focus on higher-level concepts, like checking that code reads from top to bottom, or only unit testing public methods. Reading through their implementation can give you inspiration to build your own custom cops aligned with your project’s best practices.
Why is your Rails app boot slow?
Even asked your self why is your Rails app boot slow?
Creating web app monoliths that boot instantly with Ruby
This article explores how we can create web apps that boot in under a second with Ruby.
Sending Web Push Notifications from Rails
In advance of the proposed new push notification framework for Rails 8, Action Notifier, it may be helpful to know how Web Push works under the hood. This article provides a recipe for implementing Web Push on Rails and has something you won’t find in most posts about Web Push: a working demo! (in supporting browsers and devices) 😅 [more inside]