...is being validated. This way they will be right next to defaults and other behavior for that method: describe Report do describe '#currency' do it { is_expected.to allow_values('EUR', 'USD...

...s to toggle the screen reader. Note It may feel quite strange in the beginning to use a screen reader. It is constantly commenting on everything you do and every...

Handling I have noticed, while testing my application, that the screen reader sometimes behaves a bit weirdly if you are using the mouse to navigate the page. It would...

When you have a string containing umlauts which don't behave as expected (are not matched with a regexp, can't be found with an SQL query, do not print...

flowchart LR /page1--301-->/page2 /page2--301-->/page3 This means that /page2 will become unusable as its own page. Note that a 301 with an explicit expiry via Cache...

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

moncefbelyamani.com

The linked article points out that COUNT queries might be unexpectedly slow in PostgreSQL. If you just need to know...

Static error pages To add a few basic styles to the default error pages in Rails, just edit the default...

vertical-align is hard. Have you ever wanted to vertically center an icon with text? This usually means "vertically align...

Ruby has two different ways to match the start and the end of a text: ^ (Start of line) and $ (End...

baeldung.com

There are different kind of memory measurement metrics in Linux. These are the differences: Code Name Description vsz virtual memory...

...you are also okay, in this case the JOIN might have slightly better performance. Related Also see our card How to tell ActiveRecord how to preload associations (either JOINs or...

The nokogiri gem provides different packages for several platforms. Each platform-specific variant ships pre-built binaries of libxml2, e.g...

redis.io

Hint You're not able to control which redis replica will chosen for the failover. Connect to your sentinel instance...

CSS variables are very different from preprocessor variables. While preprocessors use variables to compile a static piece of CSS, CSS...

You can ignore certain commits when using git blame with the --ignore-revs-file option. This is handy to ignore...

To attach files to your records, you will need a new database column representing the filename of the file...

When you query the browser for DOM elements, there are some footguns you should know about. Some lists are synchronized...

developer.mozilla.org

...up-clickable] attribute to make elements interactive. Elements with this attribute gain the following behavior: The element is given an [role=link] attribute so screen readers announce it as link...

github.com

The parallel-gem is quite easy to use and can speed up rendering time if you want to render the...

...rough setting (e.g. open Photos with Shotwell Viewer). If a certain file type (or better mime type) should be opened with a different application, this can be set via command...

When you repeat complex assertions in your tests multiple times, it might be a good idea to extract a custom...

...not scale the icon with the font size. One option that seems to work better is to use the mask CSS feature. The idea is to have an element with...

...var(--icon-url) center / contain no-repeat // this can probably be done in a better way: vertical-align: text-bottom margin-bottom: -.1em // depends on the icons @each $icon in...

When two classes implement the same behavior (methods, callbacks, etc.), you should extract that behavior into a trait or module. This card describes how to test that extracted behavior without...

...repeating yourself. Note that the examples below use Modularity traits to extract shared behavior. This is simply because we like to do it that way at makandra. The same techniques...

Don't sum up columns with + in a sql-query if NULL-Values can be present. MySQL and PostgreSQL cannot...