You want to prevent input to a form field, but all the solutions have side effects: The [readonly] attribute is...

developer.chrome.com

The File System Access API is a new capability of modern browsers that allows us to iterate over selected folders...

Most of the time, it's a good default to add a unique index on the foreign key when using...

Full-text search can reach its limits in terms of flexibility and performance. In such cases, trigram indexes (pg_trgm...

To connect to the serial console of an EC2 instance, you can use the aws cli. Add your public ssh...

unpoly.com

Quick guide for frequently used compiler selector patterns of Unpoly. 1. BEM Component Pattern When: Reusable UI components with multiple...

docs.zizmor.sh

The linked tool can be used to scan your CI/CD workflows for potential security issues and suboptimal defaults if they...

In Rails 8 the behavior of the rails db:migrate command has changed for fresh databases (see PR #52830).

Note Compiling Sass is probably the slowest part of your build, so this is worth a try if you're...

I had to modify the time for an application that I launch through Docker. Here is an approach that worked...

prettier calls itself an opinionated code formatter. I recommend using it for your JavaScript and TypeScript code. prettier only concerns...

There's a method Integer() defined on Kernel, that typecasts everything into an Integer. Integer("2") # 2 Integer("foo") # Invalid...

makandra dev

Rails log files rotate automatically when they reach approx. 100MB: $ ls -lh log/ -rw-r--r-- 1 user group 55M...

makandra Operations

JSON Web Tokens are often times used for authentication delegation from one system to another. They can be decoded for...

If you run a Rails app that is using Turbo, you might observe that your integration tests are unstable depending...

Most of the time, when you are interested in any log output, you see the logs directly on your console...

Coverage reports are rarely useful if you run only small parts of your test suite. Just do not load SimpleCov...

developer.mozilla.org

The linked MDN article is quite informative of a neat feature supported by all major browsers: Unicode character class escape...

RSpec examples can get quite long, especially in feature specs. This makes them hard to read & understand. Also, when executing...

makandra dev

When RSpecs runs the first feature spec, you may see log output like this: Capybara starting Puma... * Version 6.5.0, codename...

ActiveRecord computes table names of model classes, and results are usually just like you'd expect. Adding a prefix for...

Currently we often use geordi to run cucumber and rspec tests. Geordi takes care of installing a matching chromedriver for...

api.rubyonrails.org

In Rails 7.2. the feature ActiveRecord.after_all_transactions_commit was added, for code that may run either inside or outside...

In Rails 7.2 the new default for config.action_dispatch.show_exceptions is rescuable. :rescuable: It will show a Rails error page in...