Warning safe_constantize is not safe for unfiltered user input In Rails, the safe_constantize method is a powerful tool...
In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...
Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures...
This talk shows simple and advanced usages of the ruby/debug debugger. It goes through a step by step debugging workflow...
Terser is a really good minifier ("compressor") for JavaScript code. I'm often surprised by the thoughtfulness of its compressed...
Whenever you have to deal with randomness in a jasmine test there are some spy strategies to help you out...
Sometimes you want to write a test for a business rule that's based on multiple variables. In your goal...
Modern JavaScript includes Intl.NumberFormat to format numbers in different formats and locales. In this card, we describe a wrapper for...
Running gem update --system will install the latest version of RubyGems. However the latest version might not be compatible with...
This card is a short summary on different ways of assigning multiple attributes to an instance of a class.
After an upgrade to rails 7 I noticed that async reindexing jobs of Searchkick were failing for Model.reindex(mode: :async...
As we're switching from PT to Linear, I've updated the existing bash script to work for commits that...
Why do we migrate? Due to a change in licensing, we cannot provide Elasticsearch versions >= 8.0. Version 7.17.x will...
Developing or debugging SAML functionality can be a hassle, especially when you need to go back and forth with someone...
These are the top ten accessibility errors as researched by TPGi, a company focusing on accessibility. See the linked article...
I, [2024-01-21T06:22:17.484221 #2698200] INFO -- : [4cdad7a4-8617-4bc9-84e9-c40364eea2e4] test
Your development server is usually running on an insecure HTTP connection which is perfectly fine for development.
A general overview about why and how we migrate can be found under Migrating from Elasticsearch to Opensearch
When you find similar groups of expect calls in your tests, you can improve readability by extracting the group into...
If you ever need to restore exact records from one database to another, Marshal might come in handy. Marshal.dump is...
The sprintf method has a reference by name format option: sprintf("% d : % f", { :foo => 1, :bar => 2 }) # => 1 : 2.000000
While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic...
Given you have an array column like this: create_table "users", force: :cascade do |t| t.integer "movie_ids", default: [], array...
You don't want sensitive user data in your logs. Background Rails per default filters sensitive data like...