Why do we use request.xhr? in rails
Answers were Sorted based on User's Feedback
Answer / surekha matte
request.xhr? indicates the controller has
received an ajax request. It returns true or false
| Is This Answer Correct ? | 71 Yes | 8 No |
Answer / moin haidar
Conventional web application transmit information to and
from the sever using synchronous requests. This means you
fill out a form, hit submit, and get directed to a new page
with new information from the server.
When you interact with an Ajax-powered web page, it loads an
Ajax engine in the background. In response to an event web
application passes asynchronous request (XMLHttpRequest or
xhr). In fact it is javaScript object/method that performs
asynchronous interaction with the server, JavaScript object
that performs asynchronous interaction with the server and
behind the scene fetches data. and behind the scene fetches
data.
We do request.xhr? only to check the request type, either
its AJAX request or others(post, get).
| Is This Answer Correct ? | 43 Yes | 11 No |
What are the different components of rails ?
how many types of callbacks available in ror?
what is active record?
Explain model in rails?
What is the current version of ruby on rails?
What is the latest version of ruby on rails?
Am Fresher ..,i dont know seven controller methods.am searching in google .but am not getting .help me
Explain some features of nested scaffolding.
What is the difference between concern and application_controller.rb in ruby on rails?
what is the log that has to seen to check for an error in ruby rails?
what is the naming convention in Rails?
Explain me what is the function of orm in ruby on rails?