Rails default config uses the ActiveSupport::Cache::NullStore and disables controller caching for all environments except production: config.action_controller.perform_caching = false...

This is a small example on how you can check if your Postgres index can be used by a specific...

The Web Animations API has great browser support, and you should be using it to animate DOM elements from JavaScript...

makandra dev
developer.mozilla.org

The standard way to abort async code is that your function takes a AbortSignal { signal } property. The caller can use...

rspec.info

...Also see here for further examples. Please note: Usually it is preferrable to test behaviour, not method calls. Since the behaviour of both validators is thoroughly tested in their own...

...e.g. in the example the users first_name, last_name and email. But it becomes more difficult to optimize this query when joining other records (for my tests PostgreSQL was...

...to cancel event propagation, each with different semantics. event.preventDefault() Only prevents the default browser behavior for the click, i.e. going to a different url or submitting a form.

github.com

...find(..., visible: true) or find(..., visible: :visible). Note that you could change the default behavior by setting the ignore_hidden_elements config option. However, ignoring invisible elements is a useful...

...need a library for it. With ActiveRecord you could implement it with a single belongs_to association: class Node < ActiveRecord::Base belongs_to :parent, class: 'Node' end Any modification of...

makandra dev

...should help understanding the basic concepts of Ruby's object model and how things behave. Usage of objects in Ruby When working with objects in Ruby, you might think of...

...declare instance methods. This may seem completely counterintuitive. The reason is that class_eval behaves as if you would open the class manually and then write code into it. The...

makandra dev

There are two ways a logout in SAML can happen: Service Provider (SP) initiated and Identity Provider (IDP) initiated logout...

gedd.ski

Within a Flexbox layout, there are multiple CSS attributes that may affect a child's basis (the initial width before...

...Also browsers will cache the redirect forever. Appropriate status code for maintenance pages The best HTTP status code for your maintenance page is "503 Service Unavailable": The server is currently...

bundle outdated [--filter-major|--filter-minor|--filter-patch] Example output for bundle outdated --filter-major Other examples

Today I stumbled across a pretty harmless-looking query in our application which turned out to be pretty harmful and...

relishapp.com

When you are using lambdas in RSpec to assert certain changes of a call, you know this syntax: expect { playlist.destroy...

makandra Operations

If one etcd node is no longer a member of the remaining etcd cluster or fails to connect you need...

When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...

Note Compiling Sass is probably the slowest part of your build, so this is worth a try if you're...

...there" or "fill that space" (they're not suited for photographs and the like). Benefits are the MUCH smaller file size and the crisp and sharp rendering at any scale...

...actually all browsers pretend to support SVG, some barely complex use cases get you beyond common browser support. In the basic scenario, you use SVGs instead of PNG or JPG...

One of the many useful features of TextMate is autocompletion of words. If I were in TextMate right now, I...

rspec.info

You can define methods in any example group using Ruby's def keyword or define_method method: describe "example" do...

HTTP header values must only contain low-ASCII (7-bit) characters for safe transport. From RFC 7230: Historically, HTTP has...

You can use the code below to check whether the browser can make connections to the current site: await isOnline...