In Rails 5+ you can access a helper from a controller using the helpers method: # Inside a controller action

phili.pe

The linked article found a simple way to rewrite legacy git aliases to make them work with differently named default...

kukicola.io

Using ActiveRecord's #signed_id and .find_signed methods you can create URLs that expire after some time. No conditionals...

In a Jasmine spec you want to spy on a function that is imported by the code under test. This...

github.com

Instead of cobbling together default settings in several different places as the issues arise, you can define them application-wide...

We usually rely on VCR and WebMock to prevent any real network connection when running our unit tests.

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?

In esbuild, you usually import other files using relative paths: import './some-related-module' import `../../utils/some-utility-module` import `../../../css/some-css.sass` This is totally fine...

Jasmine specs for the frontend often need some DOM elements to work with. Because creating them is such a common...

tl;dr The Chrome DevTools are a neat collection of tools for the daily work as a web developer. If...

Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...

makandra dev

tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...

New versions of wkhtmltopdf dissallow file:// URLs by default. You can allow them by passing --enable-local-file-access.

You have uncommited changes (you can always check by using git status), which you want to discard.

tl;dr In RubyMine you can use find and replace with capture groups (.*?) and backreferences $1 (if you have several...

workingdraft.de

The robots.txt file and HTML tag can be used to control the behavior of search engine crawlers. Both have different...

Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name...

If you want to see the git history of a project file, that doesn't exist anymore, the normal git...

A memory leak is an unintentional, uncontrolled, and unending increase in memory usage. No matter how small, eventually, a leak...

For Rails models where only one of multiple attributes may be filled out at the same time, there is no...

When you build a JSON API you need to come up with a style to represent attributes, pagination, errors or...

If you need to convert an SVG source to PS or EPS, the most common suggestion on the interwebs is...

Working with a self-signed certificate is much easier, when the browser accepts it. Google Chrome Warnings from chrome might...