On Wed, Aug 16, 2017 at 5:25 AM, S Ahmed <sahmed1020@gmail.com> wrote:
> I know about the post request. Just ensure when it is considered a
> post.xhr? request.
From rack 2.0.3 lib/rack/request.rb:
def xhr?
get_header("HTTP_X_REQUESTED_WITH") == "XMLHttpRequest"
end
This is from Rails 5.1.2, btw. You can find the equivalent somewhere
in the 2.2 source, I imagine 😀
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yCtx%2BvukrhGL8pRF5HwXi4mhDU%2BWLMhpjquSiFoRyOo%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment