Tested against rails 4.0.11 and 4.1.7