Since Rails 7 you are able to encrypt database information with Active Record. Using Active Record Encryption will store an...
Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...
In Rails 5+ you can access a helper from a controller using the helpers method: # Inside a controller action
To retrieve only unique combinations of the selected attributes: You can omit rows, where all selected columns are equal with...
The linked article shows how metapogramming macros can use define_method to make a method that can be overridden with...
When an object is created / updated, various callbacks are executed in this order: before_validation after_validation before_save
Bundler so far ignored the version specified under BUNDLED_WITH in the Gemfile.lock. This had two annoying consequences:
TLDR if you define a equality method for a class you must also implement def hash. Ruby has a lot...
Our CI setup frequently sees this error while running yarn install: yarn install v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages...
Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...
Usually, design development starts with drafts, sketches and prototypes. These are reviewed, refined and iterated until the final design is...
In a Jasmine spec you want to spy on a function that is imported by the code under test. This...
The cards editor has a feature "Cite other card" to create links to other cards in the same deck as...
You have some SVG files you want to use as icons on your website. How would you embed them?
Jasmine specs for the frontend often need some DOM elements to work with. Because creating them is such a common...
Jasmine specs that work with DOM elements often leave elements in the DOM after they're done. This will leak...
Variable fonts are popular for two reasons: they expand design possibilities and improve website performance. While the former statement is...
Large Rails projects tend to define multiple custom ways to format Dates or DateTimes. This often leads to duplicated format...
tl;dr The Chrome DevTools are a neat collection of tools for the daily work as a web developer. If...
tl;dr In Chrome DevTools in the Elements tab or in Firefox in the Inspector tab you can right click...
Git allows you to set push options when pushing a branch to the remote. You can use this to build...
Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...
tl;dr Since Rails 7+ you can use ComparisonValidator for validations like greater_than, less_than, etc. on dates, numerics...
New versions of wkhtmltopdf dissallow file:// URLs by default. You can allow them by passing --enable-local-file-access.