Below is a strict, but still workable Content Security Policy for your Ruby on Rails project. Use this CSP if...

If you need to implement newsletter sending, rapidmail is a solid option. Support is very fast, friendly and helpful, and...

In rare circumstances, you want to use a websites full domain (say https://mywebsite.com) while testing in dev mode. This...

I have a form with a dynamic number of fields. Submitting it worked fine until I tried out a very...

Sometimes you have a maintenance script where you want to iterate over all ActiveRecord models. Rails provides this out of...

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

unpoly.com

Quick reference for passing data from Rails to JavaScript via Unpoly compilers. Haml Attribute Syntax # Ising hash rockets and string...

unpoly.com

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

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

SimpleForm comes with an option browser_validations which could be used to give fields that have a presence validation the...

tl;dr Set profile.password_manager_leak_detection to false in your Selenium Chrome options to disable password leak detection and...

Say you wrap your index view in a form to apply different filters like pagination or a search query. On...

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

haml.info

Haml renders HTML with indentation reflecting the nesting level of elements. When it comes to white-space preserving content, this...

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

evilmartians.com

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

Starting with ChromeDriver 127, if your application displays a beforeunload confirmation dialog, ChromeDriver will immediately close it. In consequence, any...

I recently stumbled upon the Rails feature composed_of. One of our applications dealt with a lot of addresses and...

ActiveModel classes have a class method .human_attribute_name. This returns a human-readable form of the attribute: Person.human_attribute...

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

developer.mozilla.org

A common cause of non-accessible web pages are elements that were made interactive via JavaScript but cannot be focused...

Any form fields where users enter numbers should be an . Numeric inputs have several benefits over : On mobile or tablet...