Fix passing resource object to edit methods