The Rails asset pipeline improves delivery of application assets (javascripts, stylesheets, images, fonts). Here are some basic facts about its...
The goal is to get Jasmine specs running in a Rails project using Webpacker, with the browser based test runner...
The linked article explains how to get a database-wide lock without creating table rows: This article explains how I...
In production, you (or your ops team) should configure a maximum number of bytes that Redis can use to store...
...per group but only one value can be picked for the results. The default behaviour of MySQL prior to version 5.7 will not complain and arbitrarily choose a value. But...
tl;dr In Chrome DevTools in the Sources tab you can activate Event Listener Breakpoints for debugging events. Example
...invalid calc value is ignored, so you might end up with missing or "random" behavior, depending on where you do this. The above example is valid once you use zero...
Inside before :each blocks you can refer to variables that you introduce via let later on. They do not need...
Around will not happen until after a feature's Background has been processed. Use Before and After to avoid that...
When the Ruby parser module of Ruby-GetText comes across a file in one of its search directories (e.g. lib/scripts...
When you use the send_file method to send a local file to the browser, you can save resources on...
...to a value. The validation is skipped silently when terms is nil. While this behavior is useful to validate acceptance in the frontend and not the admin backend, it also...
Active Record's select method allows you to make use of the power of MySQL select statements. On the one...
...be quite useful to quickly find the JavaScript that is responsible for some (unexpected) behavior. You can use DOM Breakpoints for debugging subtree modifications, attribute modifications or node removal.
This can happen with a very simple model: class Note has_many :attachments end Everything looks normal: Note.all.to_a.size # => 8 Note.all.ids.size...
Yesterday, Rails fixed a security issue (CVE-2014-3514) in Rails 4+. It was possible to use .where...
...new RegExp('^(\\d+) users') # => /^(\d+) users/ Our expression above now works only at the beginning of the matched string, looks for a number (\d+ [1]) and also captures that. Sweet...
When you use the :as option to map a power to a controller method you can now override the generated...
Sometimes you need complex expectations on method arguments like this SomeApi.should_receive(:find).with(:query => '*foo*', :sort => 'timestamp ASC', :limit...
We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...
There was an issue with makandra_sidekiq < 0.2 concerning the stopping of Sidekiq. Sidekiq < 6 has two finishing timeouts: one...
...might have a negative impact on your application's performance. We did not yet benchmark it, but using it for elements that are rendered very often is probably a bad...
Suppose you want to implement a publish/subscribe pattern in your Frontend application to react to data changes and events. First...
When terragrunt is relaying information to input variables it's happening via environment variables. Depending on the size of the...