Kudos for the super helpful error message:
I have a constraint on the route, and I was passing "posts" instead of "posts.
delete "/orphans/:type/:uid", to: "orphans#delete", as: "delete_orphaned_items", constraints: {type: /(post|page)/}
Kudos for the super helpful error message:
I have a constraint on the route, and I was passing "posts" instead of "posts.
delete "/orphans/:type/:uid", to: "orphans#delete", as: "delete_orphaned_items", constraints: {type: /(post|page)/}
GitHub - bensheldon/activerecord-has_some_of_many
Optimized top-N-per-group Active Record associations using lateral joins
This is the kind of query you write inefficiently just to get it done on every app.
Introduction to Minitest Mocks
Test doubles likes mocks and stubs can help us with isolating code under test with the rest of the system. Here’s how to mock in Minitest.
It hurts my feelings when one flaky system test causes the whole bar to turn red.
A showcase of what is possible with Progressive Web Apps today.
Charlie Munge:
The world isn't driven by greed. It's driven by envy.
Ruby Enumerable#any?
At first glance, this is not what I was expecting:
[false, false, false].any? => false
But a quick glance at the docs:
The method returns true if the block ever returns a value other than false or nil
This can be handy for doing a bunch of small tests and detecting if anything passed.
Looks interesting. I will definitely try it out once they support Ruby.
Who’s Harry Potter? Making LLMs forget
What do we do if we realize that some of our training data needs to be removed after the LLM has already been trained?