use records resources routes and fix edit bug