Rails3.0 porting with new format deficient route by Chili team

rebased #736.