Skip to content
This repository has been archived by the owner on Sep 13, 2017. It is now read-only.

Silent errors when missing .js template, but .html exists #21

Open
printercu opened this issue Mar 2, 2017 · 0 comments
Open

Silent errors when missing .js template, but .html exists #21

printercu opened this issue Mar 2, 2017 · 0 comments

Comments

@printercu
Copy link

printercu commented Mar 2, 2017

Hi!

There is */* in Accept header when remote requests are performed, so render in rails will render even html or any other templates. There is also known issue with suppressing error while executing script from response. So they both produces errors which are silent in production and can be detected in tests only either with complex browser tests, or with explicit format checks (I mean there is no exception at all when running post(path, params: params, xhr: true), in browser console too).

Do you think this behaviour should be fixed? I've found config.action_dispatch.ignore_accept_header, but it seems to appear only in 5.1.0 guides, and I don't think this is good solution for this case, as it works only for the whole app.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant