I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...
A MySQL DECIMAL column is used when it is important to preserve exact precision. It takes two parameters, where...
When you do something like this in your code: def var_value @var ||= some_expensive_calculation end
Give the table a style table-layout: fixed Give the cells in the first row a width The same width...
TLDR: This card explains which threads and processes interact with each other when you run a Selenium test with Capybara...
tl;dr: Using has_many associations with a :through option can lead to lost or duplicate records. You should avoid...
We've since created ActiveType which has a restricted subset of Virtus' features. It might be enough for your needs...
This error occurs when you already have a database.yml which defines the database for the cucumber environment instead of test...
When you want to find out the data type of an attribute, you can just use ActiveRecord's columns_hash...
Usually our mysql queries are not case sensitive. In order to query case sensitive, you can use the mysql COLLATE...
Whenever you create a table from a database migration, remember to add updated_at and created_at timestamps to that...
Ubuntu has a package mysql-sandbox that lets you install multiple MySQL versions into your user home: Install mysql-sandbox...
When writing Rails migrations to convert a string column to an integer you'd usually say: change_column :table_name...
I recently experienced the error ActiveRecord::StatementInvalid: Mysql2::Error: closed MySQL connection. Apparently this happens when there is a timeout...
There may be reasons to change the locale of your Postgres cluster. A popular one is your development system's...
So you're switching to PostgreSQL from MySQL? Here is some help... General hints on PostgreSQL \? opens the command overview...
When you're writing migrations that do more than changing tables (like, modify many records) you may want some output...
Box shadows are awesome. Unfortunately they are also very costly to render. You will rarely notice the rendering time on...
When you have files in your .gitignore they won't be considered for changes, but still you might want to...
We tend to use database transactions as a magic bullet to get rid of all our concurrency problems. When things...
Consul 0.9 comes with many new features to optimize powers that only check access to a given record. e.g. Power.current.post...
Remember why preloading associations "randomly" uses joined tables or multiple queries? If you don't like the cleverness of this...
Active Record's select method allows you to make use of the power of MySQL select statements. On the one...