fix buf with friendly ID and rails 4 compat