-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
determine if request is xhr? #1817
Comments
The =~ operator returns a value whose boolean interpretation is true or false. That's all a predicate is required to do. |
No it returns the position the first match which could be 0 and it will be evaluated false then. |
You need to double-check your Ruby ;). |
jake3030
pushed a commit
to jake3030/rails
that referenced
this issue
Jun 28, 2011
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In rails 3.1.0.rc4
File actionpack/lib/action_dispatch/http/request.rb, line 148
reads
but it should be something like this:
The text was updated successfully, but these errors were encountered: