use new method for rails 3.x