create_or_find_by and find_or_create_by are not the same in Rails
A short note on why these two Rails methods look similar but behave differently under concurrency.
personal notes
Short, practical writing about programming, debugging, and the details that shape how code behaves.
AI answer
A short note on why these two Rails methods look similar but behave differently under concurrency.
A simple note on using find_sole_by when your query should return exactly one record.
A practical guide to using TLP and a charging threshold to reduce battery wear on Linux laptops.
A short note on using performed? to check whether a Rails action has already rendered or redirected.
A simple note on using Postgres advisory locks from Rails when only one process should run a critical section.