replace missing ar method for rails3