When a user shares your content, a snippet with title, image, link and description appears in her timeline. By default...
You can share a state in Ruby with global variables. Even if you should avoid them whenever possible, for debugging...
When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...
webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...
RubyMine comes with a nice way to grep through your project's files: The finder (ctrl + shift + f). Don't...
Jasmine has long standing support for writing asynchronous specs. In days gone by we used the done callback to achieve...
Not all versions of Node.js are compatible with each other. Also npm packages may require a minimum or maximum version...
Until Capybara 2, node finders that accept a text option were able to find nodes based on rendered text, even...
jQuery has a function $.fn.trigger(). You can use it to dispatch an event on a jQuery object: let $element = $('.foo...
To keep JavaScript sources small, it can sometimes make sense to split your webpack bundles. For example, if your website...
Download buttons can be difficult to test, especially with Selenium. Depending on browser, user settings and response headers, one of...
We're always striving towards keeping our website's JavaScript as small as possible. If you're using webpack(er...
TL;DR Most web applications do not require action on this. SameSite=None (old browser default) will continue to work...
When delivering non-public uploaded files (images, documents etc), one has to decide whether and how to do authorization. The...
An alternative of using a multiple assignment for a Regex are named groups. Especially when your Regex becomes more complicates...
To avoid multiple versions of a package, you can manually maintain a resolutions section in your package.json. We recommend you...
When doing some meta-programming magic and you want to do something for all attributes of a class, you may...
In Rails, we usually have a mailer setup like this: class MyMailer < ActionMailer::Base def newsletter mail to: 'receiver@host.tld',
RSpec >= 3.3 added aggregate_failures, which allows multiple failures in an example and list them all, rather than aborting on...
Class-level process definitions are only applied to the original file Versions are generated based on the processed original file...
When restoring a PostgreSQL dump using pg_restore, you usually add the --clean flag to remove any existing data from...
When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...
When projects run for many years, they require special regular maintenance to stay fresh. This kind of maintenance is usually...
It is very common to parse dates from strings. It seems obvious to use Date.parse for this job. However this...