You might have a table without a primary key set in MySQL. You can fix this by adding a primary...
Wondering how a specific method on an object is exactly named? You can use Enumerable#grep to detect it in...
For reasons that completely escape me, MySQL 5.x limits UTF-8 strings to U+FFFF and smaller.
Like in any language, a FLOAT has complicated semantics for precision. This sometimes causes stored numbers to be slightly off...
Arel is a library that was introduced in Rails 3 for use in constructing SQL queries. Every time you pass...
Rails 4.0 introduced a helpful new method for ActiveRecord queries: where.not. It can make clunky queries easier to read.
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...
We have released Modularity 2. It has many incompatible changes. See below for a script to migrate your applications automatically...
When you do something like this in your code: def var_value @var ||= some_expensive_calculation end
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...
Setting the colorbox opacity by hash parameter when initializing doesn't work the way like the documentation tells you.
We've since created ActiveType which has a restricted subset of Virtus' features. It might be enough for your needs...
In Ruby, classes and modules are called constants. This card explains how Ruby resolves the meaning of a constant.
Goal Within before_* Within after_* Cancel later callbacks throw :abort throw :abort Rollback the transaction throw :abort raise ActiveRecord::Rollback...
If you're still working on ruby 1.8, you should know that using SimpleDelegator is often prohibitively slow. I have...
This error occurs when you already have a database.yml which defines the database for the cucumber environment instead of test...
Say you have a User with a Carrierwave attribute #avatar: class User < ActiveRecord::Base mount_uploader :avatar, AvatarUploader end
When you want to find out the data type of an attribute, you can just use ActiveRecord's columns_hash...
The mobile-friendly, responsive, and lightweight jQuery date & time input picker. Does not depend on jQuery UI, but currently does...
Usually our mysql queries are not case sensitive. In order to query case sensitive, you can use the mysql COLLATE...
Font Awesome 4 has renamed all icons. What the fuck. Check the attached link for an icon list for the...
Whenever you create a table from a database migration, remember to add updated_at and created_at timestamps to that...