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.
An Introduction to Metaprogramming in Ruby
Explore some of the fundamentals of metaprogramming in Ruby: https://blog.appsignal.com/2023/07/26/an-introduction-to-metaprogramming-in-ruby.html
Simple Lazy Loading in Rails with Hotwire and Turbo Frames 😴
Hey, I just published an article all about lazy loading with Hotwire and Turbo Frames in your Ruby on Rails apps. [more inside]
How to organize CSS in a Rails project
CSS has a reputation for inevitably turning into spaghetti code. It doesn’t have to be that way! You can keep styles tidy in your next Rails app by applying similar rules to CSS as you would to Ruby code: avoid formal structure until you really need it, be clear and concise in your naming, and keep your eyes open for opportunities to refactor as you go. https://mattbrictson.com/blog/organizing-css-in-rails
Moving data out of our database and into....s3!
We were (stupidly) storing tons of data in the database that really didn’t need to be there. See what we did to move it out of the database. So simple! https://psmy.medium.com/optimizing-data-storage-in-ruby-on-rails-a-seamless-migration-from-database-to-aws-s3-910f27fa0029
online_migrations 0.8.0
Released a new version of the gem for zero downtime migrations - https://github.com/fatkodima/online_migrations/blob/master/CHANGELOG.md#080-2023-07-24 with a few new checks:
Scarpe Diem With Nick Schwaderer | Rubber Duck Dev Show 93
In this episode, we discuss Scarpe which is a successor to the Shoes Ruby desktop application builder with Nick Schwaderer: https://www.rubberduckdevshow.com/episodes/93-scarpe-diem-with-nick-schwaderer/
Ruby Step-By-Step Guide - Sub 1k - Inside The First Thousand Ordinal Inscriptions
is it ordinal summer? i’ve started on a free (online) programming ordinals (in ruby) step-by-step guide / booklet. the first chapter titled Sub 1k - Inside The First Thousand Ordinal Inscriptions shows you how to build a (local) sub1k sqlite database (from scratch / zero) - it’s about 40 MB - and than query for analytics / statistics via sql (using activerecord). happy programming (and data analytics) with ruby.
Rails' Sixth Sense: Unravelling the mystery of the autoloaders
A two-part series on how file autoloading works in Rails (including an explanation of what ‘zeitwerk’ really is) [more inside]
Passkey Authentication with Rodauth
Rodauth supports passkeys for multifactor authentication, or for passwordless login and registration – https://janko.io/passkey-authentication-with-rodauth/.
Simple guide to pessimistic locking in Rails
In the Rails world, optimistic locking is relatively well known, while its pessimistic alternative is often overlooked. In this blog post, I’m presenting how to effectively use pessimistic locking in Rails applications. https://www.visuality.pl/posts/a-simple-guide-to-pessimistic-locking-in-rails
Common Distance Metrics Implemented in Ruby
The fields of machine learning and artificial intelligence rely, fundamentally, upon the ability to measure the distance between two points. In this article we introduce some of the most common metrics used, discuss their interpretation and demonstrate how these can be implemented in ruby. Check it out here and let me know what you think.
MiniDefender Gem - Comprehensive Validation Gem for Rails
Mini Defender allows the developer to quickly and easily validate incoming requests data as the verify first step in the request, alongside this Mini Defender also provides the following benefits: [more inside]
"The Ruby on Rails Interview Bible 2023"
“The Ruby on Rails Interview Bible 2023” - A Comprehensive Guide with 500+ Essential Questions and Answers! #ruby #book #rails #interview #job #jobhelp #preparation #betterjob #itjobs #programmer #ebook #remotework #juniors #seniors https://nezirzahirovic.gumroad.com/l/bible
"🎓 Ready to master Ruby on Rails? Look no further! https://quiz.rubyonrails.ba
“🎓 Ready to master Ruby on Rails? Look no further! https://quiz.rubyonrails.ba offers 16 engaging games, 600 thought-provoking questions, and a vibrant community of 200 fellow learners. Join us today and unlock your Rails potential! 🚂💡 #WebDevelopment #RailsLearning #Ruby #Job”
Ruby's method-lookup path and Object Individuation
Objects seek their methods in both classes and superclasses, all the way up the inheritance tree; let’s see how this method-lookup process works when modules are also involved. [more inside]
Exploratory Guide on Active Model Dirty in Rails
Explore the Active Model Dirty API in Rails with this in-depth guide. Learn how to track changes to your model objects, handle validations, and persist changes to the database. [more inside]
ordinals gem - ordinal inscription api & recursive image helpers and more
is it ordinal summer? i’ve put together the ordinals gem - a light-weight (free, no api key required) ordinal api wrapper / client for inscriptions (letting you fetch metadata and content) and bonus the new version 1.1.0 now includes recursive image helpers (that let you generate .SVGs) … see diypunks.svg on the ordtest(net) with 9 recursions as an example.
Service Objects On Rails
Yes I know, another one of those ;) Bear with me, I believe we can add a bit to the debate and give some practical tips on why, and how, service Objects work for us. [more inside]
Creating Custom Rails Generators
After several failed attempts at creating custom Rails Generators over the years, I finally got around to really digging in and put together a medium-fidelity guide to understanding them and getting them working. https://garrettdimon.com/journal/posts/creating-custom-rails-generators