Text fragments allow linking directly to a specific portion of text in a web document, without requiring the author to...
Rails' fragment caching caches subtrees of an HTML document tree. While constructing that tree though, it can be really hard...
Fix an error being thrown when a caching request is tracking an existing request to the same URL, and...
Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures...
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...
Whenever you have to deal with randomness in a jasmine test there are some spy strategies to help you out...
I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...
ActiveModel classes have a class method .human_attribute_name. This returns a human-readable form of the attribute: Person.human_attribute...
In Rails 7.1 it has become possible to annotate partials with the locals they expect: # partial _user_name.erb <%# locals: (user:) %>
If an view spec crashes due to undefined helper methods, you can enable this option: # config/application.rb config.action_controller.include_all_helpers = true...
Your commit messages should include the ID of the issue your code belongs to. Our preferred syntax prefixes the issue...
This card describes two variants, that add a more intuitive workflow when working with nested attributes in Rails + Unpoly.
This card describes different flavors for concatting HTML safe strings in a helper method in Rails. You might want to...
...HTML elements can automatically start playing when the autoplay attribute is set on them. Except for when they can not...
Debugging performance issues in your Rails app can be a tough challenge. To get more detailed insights consider using the...
Note Using rem only ever makes sense when the root font size is dynamic, i.e. you leave control to the...
If you are using git submodules in Gitlab CI, you might run into a "The project you were looking for...
tl;dr Prefer request specs over end-to-end tests (Capybara) to joyfully test file downloads! Why? Testing file downloads
A common cause of non-accessible web pages are elements that were made interactive via JavaScript but cannot be focused...
I recently noticed a new kind of flaky tests on the slow free tier GitHub Action runners: Integration tests were...
Any form fields where users enter numbers should be an . Numeric inputs have several benefits over : On mobile or tablet...
A Rails script lives in lib/scripts and is run with bin/rails runner lib/scripts/.... They are a simple tool to perform...
Today I learned that you can animate HTML elements using the Web Animation API's method .animate(keyframes, options) (which...