Works in rails 3.2 as well