[V4] Rails3.0 porting with mix of old and new format route

rebased #772.