When deploying Rails applications you might have noticed that JS and CSS are not cached by all browsers.
Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...
One of the many useful features of TextMate is autocompletion of words. If I were in TextMate right now, I...
If you're frequently switching between projects, you might be annoyed by RubyMines behavior of opening the last project on startup. After all loading a project takes a few seconds...
...a dialog to choose the project to open. This can be set under Appearance & Behavior > System Settings > Project > Reopen projects on startup. Switching to other projects A helpful dialog for...
PostgreSQL uses the C library's locale facilities for sorting strings: First, all the letters are compared, ignoring spaces and...
The way that Javascript schedules timeouts and promise callbacks is more complicated than you think. This can be the reason...
...a strategy to manually enable certain origins to interchange data. Because CSRF exploits browser behavior, its mitigation CORS is also implemented by browsers. CORS procedure The CORS workflow is basically...
Starting with Rails 7.1 the production logger is set to standard out. For applications running with opscomplete ensure to keep...
Note Don't use reruns as a mean to work around flaky tests. You should always try to fix those...
If your application exports CSV, be advised that Excel and other spreadsheet applications treat certain cells (those starting with =, +, - or...
Instantiating ActiveRecord objects comes expensive. To speed up things, you can choose a more direct way to talk to your...
tl;dr Don't forget require 'English' if you use a named global such as $LAST_MATCH_INFO. Otherwise this...
All direct child directories of app are automatically added to the eager- and autoload paths. They do NOT create a...
Insomnia is a GUI tool to help you communicating with an API. There are also other tools to do this...
...to the original file Versions are generated based on the processed original file Callbacks (before/after) are applied to original file and each version by itself Under the hood, a version...
Ubuntu 18.04 uses systemd to manage services. There are basically two commands for listing all services and manipulating the state...
In the following example the method update_offices_people_count won't be called when office_id changes, because it...
...like keeping some HTML. If you only care about line breaks, you might be better off using a small, specialized helper method: def format_linebreaks(text) safe_text = h(text...
When using virtual attributes, the attached trait can be useful to automatically copy errors from one attribute to another.
In the Gitlab settings the flag Auto-cancel redundant pipelines is enabled by default. This auto-cancels jobs that have...
...the joins, and then authors for the pluck clause. The first corresponds to the belongs_to relationship, and the latter is the name of the db table. You could even...
First find the reference for the entry you want through looking at the stash: $ git stash list stash@{0}: WIP...
...you can use a special form options helper called #collection_check_boxes. It behaves similar to #collection_select, but instead of a single select field it renders a checkbox and...
Ruby lets you re-use existing RegExp objects by interpolating it into new patterns: locales_pattern = /de|en|fr|es/i...