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.
Practical Guide for Database Scaling: how to use Postgres logical replication
How to scale databases using Postgres Logical Replication to optimize performance, manage read replicas and easily handle intensive loads. [more inside]
Lack of Support/Participation and the Software Engineering Code of Ethics
Some Software Engineers mention “not being interested” as an excuse not to help someone with something that could benefit customers or the Software Engineering community at large (including the Ruby community) when the real reason is in fact covert discrimination against that person and lack of effort to treat them as an equal and equally respected member of their community. Know that Software Engineers have to abide by the Software Engineering Code of Ethics. And, it includes the statements: “Software engineers shall act consistently with the public interest” and “Software engineers shall be fair to and supportive of their colleagues”. [more inside]
New Calendlyr version released 🚀 Support for all Calendly API calls
Easy and comprehensive rubygem for Calendly. Currently supports API v2. [more inside]
EuRuKo 2024 conference reflection
Last week I attended the EuRuKo conference in Sarajevo. It was super fun and I wrote a reflection on it from my point of view: EuRuKo 2024 conference reflection
Oktest 1.3.0 released
I released Oktest 1.3.0.
Oktest is a new-style testing library for Ruby.
You can write ok {1+1} == 2 with Oktest instead of assert_equal 2, 1+1 or expect(1+1).to eq 2.
In addition, it is very easy to test JSON data by JSON matcher in Oktest. [more inside]
Query collections of ActiveModel objects like an ActiveRecord::Relation
Working with collections of ActiveModel objects next to ActiveRecord objects is always kinda awkward because the interfaces for filtering, sorting, and querying are so different 😫 This is why we just released ActiveModel::Relation which attempts to provide the same interface to work with collections of ActiveModel objects that you’re used to from ActiveRecord::Relation 🎉 Check out the repository to learn more!
Write your private methods like they're public
When designing my abstractions, I’ve always had a very binary view about separating private and public behaviors. A recent gotcha got me to reconsider my practice with a little more nuance. Now, I treat my private methods as if they were public methods.
RSpec Stubs The Object In Memory
Have you ever tested a method that pulls records out of the database and applied mocks to those records you just created in your test? Have you been surprised that the record does not appear to have the behavior you mocked out? I have an explanation of the situation for you and some options for how you can address it. [more inside]
Win a ticket to Rocky Mountain Ruby
Rocky Mountain Ruby is back this year (October 7 & 8), and Honeybadger is a Sapphire sponsor! To celebrate, we’re giving away a free conference ticket. Enter to win by 9/20.
🌶️ The Post-JAMstack Era: Just Use Rails.
Get your spicy 2024 hot-takes right here
Advanced forms in Hanami 2 - Complex views, 0 logic
Working with templates is a hard job and eliminating the logic out of them is absolutely not trivial. In this episode we’ll use Hanami tools to implement advanced forms with 0 logic in templates. [more inside]
How to Use Azure Blob Storage with Rails
With ActiveStorage’s built-in Microsoft Azure Storage Service, using Azure Blob Storage to manage file uploads in your Ruby on Rails app is easier than you think. Check out this article by Jeffery Morhous to learn how.
NextJS to Rails: The code that powers our new marketing site
I just finished rebuilding our marketing site in Ruby on Rails, and it’s such a joy to work with! In this video I take you on a tour of our new Rails-driven “content” site.
Separating env files for dev and production when using Kamal with Dotenv
Read how to cleanly handle .env conflict between Dotenv and Kamal
A change that makes experience with actual_db_schema even smoother
🚨 New in #actual_db_schema v0.7.9: No more frustrating halts on failed phantom migrations! Instead of “failing fast,” errors are now collected and reported in the console, keeping your workflow smooth and helping you complete schema dumps without interruptions. [more inside]
Updates to Everyday Rails Testing with RSpec, 2024 edition
Hi Ruby friends, I’ve pushed up the latest batch of updates to the 2024 edition of Everyday Rails Testing with RSpec, including: [more inside]
Using OmniAI to Convert PDFs to Markdown with LLMs
A guide to converting a PDF into Markdown using OmniAI with OpenAI and MuPDF. https://workflow.ing/blog/articles/using-omniai-to-convert-pdfs-to-markdown-with-llms
How to load a lazy loaded turbo frame a bit before it scrolls into view
A quick tip on improving lazy loaded turbo frames. Sometimes you want to start loading it a bit before it scrolls into view to provide a smoother UX: How to load a lazy loaded turbo frame a bit before it scrolls into view
10x Developer Puzzle, Solved!!!
Here is a thought! The mythical 10x Developer is simply a developer that eliminates 9/10 of unnecessary over-engineered code, and then writes the remaining 1/10 of the code needed at the productivity rate of a 1x Developer… Continue reading at: https://andymaleh.blogspot.com/2024/09/10x-developer-puzzle-solved.html
Take the Ruby Quiz
I just published a new Ruby Quiz. There are 10 questions randomly sampled from a bigger set, so every time you reload the page, you will get a different quiz. Take the quiz, share your score and challenge your friends! :)
Say No To Partials And Helpers For A Maintainable Rails Front-End
After reading Garrett Dimon’s excellent post on effectively using partials and helpers, I wrote up my own take—avoid them entirely and use Phlex instead.