Given there is a user with an attachable avatar: class User < ApplicationRecord has_one_attached :avatar end

Given there is a user with an attachable avatar: class User < ApplicationRecord has_one_attached :avatar end

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

developer.mozilla.org

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

The ActiveSupport::BroadcastLogger allows you to log to multiple sinks. You know this behavior from from the rails server command...

You can improve your LIKE / ILIKE search queries in PostgreSQL by adding a GIN index with an operate class ("opclass...

Rails' default logger prefixes each log entry with timestamp and tags (like request ID). For multi-line entries, only the...

Recently I needed to benchmark an Active Record query for performance measurements. I wrote a small script that runs each...

You might know a few examples, where you configure some library via a block. One example is the Rails configuration...

This cards describes an example with a Github Client on how to keep your Rails application more maintainable by extracting...

This card is a short summary on different ways of assigning multiple attributes to an instance of a class.

shoelace is a library of web components. Here is a proof of concept how a integration (slightly different as the...

Raising errors for required and permitted attributes makes it easier to find errors in your application during development and in...

This card describes two variants, that add a more intuitive workflow when working with nested attributes in Rails + Unpoly.

We are using assignable_values for managing enum values in Rails. Nevertheless Rails is adding more support for enum attributes...

open-ui.org

tl;dr When browsers start to adapt proposals from Open UI, it might not be necessary to use any 3rd...

This card describes different flavors for concatting HTML safe strings in a helper method in Rails. You might want to...

Starting with Rails 7.1 the production logger is set to standard out. For applications running with opscomplete ensure to keep...

87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET /monitoring/pings/ HTTP/1.1" 200 814 "-" "Ruby" 87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET...

I, [2024-01-21T06:22:17.484221 #2698200] INFO -- : [4cdad7a4-8617-4bc9-84e9-c40364eea2e4] test

Here are some hints on best practices to maintain your tasks in larger projects. Rake Tasks vs. Scripts

You can use the config.x configuration in combination with config_for to configure global settings for your Rails 4.2+ application...

In the Gitlab settings the flag Auto-cancel redundant pipelines is enabled by default. This auto-cancels jobs that have...