For long running scripts it is useful to show a indicator for the progress in the terminal. Alternatively you can...
SVG files often contain redundant information, like editor metadata or hidden elements. When esbuild handles your static assets, you can...
Method delegation in Rails can help you to keep your code organized and avoid deep call chains (law of demeter...
When debugging slow SQL queries, it’s helpful to understand the database engine's query plan. Whenever you execute a...
The new params.expect method in Rails 8 improves parameter filtering, addressing issues with malformed input and enhancing security. It provides...
Also see the list of IRB commands. Switching the context Changes the "default receiver" of expressions. Can be used to...
tl;dr When a cookie includes an Expires attribute or an HTTP response includes caching headers like Expires or Cache...
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...
A lesser known fact about PG enums is that they are ordered. This can be really handy when values have...
When using Rails credentials, you will edit the encrypted credentials for staging or production environments from time to time. To...
While the main goal always is to prevent long-running queries in the first place, automatic timeouts can serve as...
You can improve your LIKE / ILIKE search queries in PostgreSQL by adding a GIN index with an operate class ("opclass...
Rails credentials are a way to store secrets in an encrypted YAML file. Usage is simple: each key in the...
It's possible to implement simple custom RuboCop cops with very little code. They work exactly the same like existing...
Sometimes we have to write code that behaves differently based on the version of a specific gem or the Ruby...
When Rails releases a new version of their gems, they also release a number of npm packages like @rails/activestorage or...
This card is a short summary on different ways of assigning multiple attributes to an instance of a class.
ActiveModel classes have a class method .human_attribute_name. This returns a human-readable form of the attribute: Person.human_attribute...
When you mocked method calls in RSpec, they are mocked until the end of a spec, or until you explicitly...
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...
Debugging performance issues in your Rails app can be a tough challenge. To get more detailed insights consider using the...
Starting with Rails 7.1 the production logger is set to standard out. For applications running with opscomplete ensure to keep...