fix error caused by change of new rails 4.1 api