-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lucky::RequestTypeHelpers#ajax? always false #1131
Comments
Ohh that makes sense. Would you mind writing a PR with a spec that catches this and then put |
Ok, But the question is why they are exclusive? I can make xhr request and it will be both :js and :ajax I can't just move line just ahead of I suggest remove this spec lucky/spec/lucky/mime_type_spec.cr Lines 27 to 30 in b59d48d
and make request_type_helpers.cr#ajax? just check XMLHttpRequest, same as rails xhr? |
@skojin You are totally right. Removing that spec and making |
Use ajax? in redirect helper instead of inline check Fixes luckyframework#1131
Use ajax? in redirect helper instead of inline check Fixes #1131
enable :js format in action:
accepted_formats [:js]
do remote request with rjs
ajax?
returns false becauseclients_desired_format == :js
This happen because accept_header checked before X-Requested-With
lucky/src/lucky/mime_type.cr
Lines 54 to 57 in b59d48d
The text was updated successfully, but these errors were encountered: