We're usually running Ubuntu LTS versions. Sometimes newer hardware requires packages from more recent Ubuntu releases that only come...
use Postgres' lower() function add an index on lower(email) Probably the best approach is to just convert emails (and usernames) to lowercase within Rails. Popular authentication libraries...
...for Rails 2 and 3. Recently, caching with timestamp- or content-based keys has become more popular which saves you the pain of invalidating stale caches. How to enable/disable caching...
...member', :home_page end It has some limitations: Only works for singular member references ("belongs to"), not for a collection of references ("has many") No support for deletion (but could...
This page lists many query methods and options in ActiveRecord which do not sanitize raw SQL arguments and are not...
Website that offers lots of different kinds of HTTPS configurations, bad or good or complicated. They also offer a dashboard...
tl;dr The :is() pseudo selector - specificity of its most specific argument - matches against a comma-separated list of selectors...
...file. Note that this is # not guaranteed to be 100% accurate. It performs a "best guess" based # on a simple test of the first +File.blksize+ characters. # # Example: # # File.binary?('somefile.exe') # => true...
tl;dr The :where() pseudo selector - zero specificity - matches against a comma-separated list of selectors. Example Compound selectors like...
Rails offers a way to prepend (or append) view paths for the current request. This way, you can make the...
Sidekiq 7 adds a new feature called capsules. Use cases: a chrome queue limited to 1 for e.g. PDF processing...
...more information about this issue. In Rails3+ you can also disable this annoyingly clever behavior. Why this is bad This has some develish implications for your deployment, because scopes written...
...t notice this during development. Let's say you have a model Note which belongs to an Author and has a string column category: class Note < ActiveRecord::Base
A primer on vector graphics For rastered image formats like JPG or PNG, each pixel is basically drawn on a...
...lockfile carefully when submitting a commit. Note that the approach in this card works best, if you use yarn outdated or npm outdated together with yarn upgrade some_package or...
The classical scenario: There's a parent div element and you want to center some arbitrary child element vertically inside...
...all routes, but may return early, a change has been introduced to add lazy behavior by adding an iterator block and yielding. This change breaks the adapter patch in routing...
For string columns, MySQL indexes the left side of a string. That means an index can speed a like query...
So your Cucumber feature sometimes dies with this exception: Modal Dialog Present (Selenium::WebDriver::Error::UnhandledAlertError) As a seasoned Selenium...
...API design, I thought it might be nice to write down a set of best practices. And poke fun at a couple widely-used APIs. Much of this may be...
Interactively rebase your current branch onto main, keeping the original base commit (i.e. not rebasing onto main directly).
Rails' default logger prefixes each log entry with timestamp and tags (like request ID). For multi-line entries, only the...
Although you can access many symbols using the AltGr key you may be missing some, like the en-dash (–) or...
Some users might use Adblock Plus or similar browser plugins to reduce the number of ads displayed. If you run...
I have a form with a dynamic number of fields. Submitting it worked fine until I tried out a very...