我想这样做:
In the view, have a button_to "Find"
The button click submits the search query to the rails action (controller)
The action calls some external api
A response comes back in 1ms up to 20secs (who knows? it's an external webservice, right?)
When the response is returned, the view which originally contains the button_to and the search field is updated with the response (via javascript)
- 这背后的基本思想是什么?
- 这叫什么?
- 返回响应时如何更新视图?
谢谢