For Selenium tests, your browser starts in your local timezone, or whatever your system's environment specifies. This is usually...

Why Rails has multiple schema formats When you run migrations, Rails will write your current database schema into db/schema.rb. This...

developer.mozilla.org

Here is a workaround for when you want to use text-wrap: balance but must also render nicely for browsers...

DirectUpload allows you to upload files to your file storage without having to wait for the form to submit. It...

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...

PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or...

There are several ways to run a single spec. I usually copy the spec file path with the line number...

Sometime we've seen this error when executing e.g. bundle exec rake asset:precompile: double free or corruption (out)

The key to unlocking the full potential of LLMs in coding lies in crafting precise prompts. The main challenge is...

In Slack, the settings dialog only offers a fixed selection of fonts. You can use any font you like using...

Rails wraps your parameters into an interface called StrongParameters. In most cases, your form submits your data in a nested...

github.com

The new params.expect method in Rails 8 improves parameter filtering, addressing issues with malformed input and enhancing security. It provides...

makandra dev

Bundler allows you to specify the name of the Gemfile you want to bundle with the BUNDLE_GEMFILE environment variable...

To reverse lookup a fixture by its table name and id, use the following approach on ActiveRecord::FixtureSet: table = 'users...

TL;DR: Rails ships two methods to convert strings to constants, constantize and safe_constantize. Neither is safe for untrusted...

In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...

tl;dr When a cookie includes an Expires attribute or an HTTP response includes caching headers like Expires or Cache...

When setting up cronjobs, commands somtimes output something every time. If these commands don't support limiting their output to...

In FactoryBot factories, Rails' file_fixture is not available by default. To enable it, include a support module from rspec...

evilmartians.com

Some key highlights and points from the linked article TestProf II: Factory therapy for your Ruby tests. The Problem with...

developer.mozilla.org

Text fragments allow linking directly to a specific portion of text in a web document, without requiring the author to...

When Ruby objects are inspected in any modern IRB, some objects (like ActiveRecord instances) are rendered with neat colors and...

github.com

Zeitwerk is the new autoloader of Rails. It is mandatory starting with Rails 7.0. Sometimes, a model needs to know...