ActiveRecord offers an explain method similar to using EXPLAIN SQL statements on the database. However, this approach will explain all...
Instead of using this hack you might want to use MariaDB 10.x which can work with both old and...
When creating an index using CREATE INDEX, Postgres will create a B-Tree type index by default. The B-Tree...
You can find out about disk space usage of all tables within your database by running this: SELECT table_name...
If you want to perform a failover on another haproxy backend server this is the way you should do it...
When full text search is overkill and like queries do not deliver this might be an approach you could try...
Don't write resources :people, :concerns => :trashable Write resources :people do concerns :trashable end Why Writing a controller...
If you are on a Linux shell and want to open a file with whatever default application is configured for...
TL;DR There are three dimensions you can control when scoping routes: scope module: 'module', path: 'url_prefix', as: 'path...
Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...
Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...
Cause logstaglia is so cool you may want to record a video. We're lucky: Logstalgia has a parameter for...
SELECT pg_database.datname as "database_name", pg_database_size(pg_database.datname)/1024/1024 AS size_in_mb FROM pg_database ORDER...
PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...
If you have many connections to your MySQL or MariaDB (as we have) you might want to filter the list...
Regular expressions in Javascript are represented by a RegExp object. There also is a regex literal as in many other...
I recommend to go straight to 2.1.5+ without intermediate steps. Otherwhise you burden yourself with unnecessary work of encoding problems...
You can use mail-tester.com to check your application's e-mails for issues that might cause e-mails to be...
You want to test your 1GE or 10GE internet uplink? We needed to ensure we have full 10GE to the...
When dealing with AR scopes, you can remove conditions, order, etc by using the unscope method. It is available on...
Our applications not only need to be functional, they need to be fast. But, to quote Donald Knuth, premature optimization...
Starting with Ruby 1.9, most #each methods can be called without a block, and will return an enumerator. This is...
Method lookup Understand all the terms in How Ruby method lookup works, in particular: include extend singleton class
With ngAnimate, you can easily animate certain events (see directive support). We'll make use of ngClass animations to style...