Quick reference for passing data from Rails to JavaScript via Unpoly compilers. Haml Attribute Syntax # Ising hash rockets and string...
GoodJob and ActiveJob rescue exceptions internally, preventing exception_notification from triggering. This can cause silent job failures.To get notified, subscribe...
prettier calls itself an opinionated code formatter. I recommend using it for your JavaScript and TypeScript code. prettier only concerns...
Most of the time, when you are interested in any log output, you see the logs directly on your console...
RSpec examples can get quite long, especially in feature specs. This makes them hard to read & understand. Also, when executing...
When you repeat complex assertions in your tests multiple times, it might be a good idea to extract a custom...
If you want to build a small CLI application, that supports more advanced inputs than gets, I recommend using the...
Even if you don't make any beginner mistakes like N+1 queries or missing DB indices, some requests can...
Use these snippets when you want to measure yourself. Currently available: Core Web Vitals Largest Contentful Paint (LCP) Largest Contentful...
Say you wrap your index view in a form to apply different filters like pagination or a search query. On...
You can check the maximum client Redis database size in Sidekiq with this command. Sidekiq.redis { |redis| puts redis.info.fetch('maxmemory_human...
Orca is a Linux screen reader. Since it is part of the GNOME project it should come preinstalled with Ubuntu...
Why Rails has multiple schema formats When you run migrations, Rails will write your current database schema into db/schema.rb. This...
ActiveStorage does not provide any built-in way of implementing authentication for the available DirectUpload endpoint in Rails. When using...
SVG files often contain redundant information, like editor metadata or hidden elements. When esbuild handles your static assets, you can...
There are several ways to run a single spec. I usually copy the spec file path with the line number...
The key to unlocking the full potential of LLMs in coding lies in crafting precise prompts. The main challenge is...
Ubuntu 24 added some guarding for Python packages which no longer allows installing applications through pip on system level. Instead...
Rails wraps your parameters into an interface called StrongParameters. In most cases, your form submits your data in a nested...
The new params.expect method in Rails 8 improves parameter filtering, addressing issues with malformed input and enhancing security. It provides...
Also see the list of IRB commands. Switching the context Changes the "default receiver" of expressions. Can be used to...
Your package-lock.json should always match and resolve all packages from your package.json. Coming from Yarn, I was looking for an...
In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...
In FactoryBot factories, Rails' file_fixture is not available by default. To enable it, include a support module from rspec...