Requires rails 3 or greater.