another fix for tableless in rails 4.0.1
fix displaying errors

don't display htlm when loading action fails
don't display error 500 message on JS error, only Internal error