开发者

Update content when new values are added to database?

I know my question might be ovbious for some of you, but I'm not sure how to do it, and I can't find it on google, probably because I'm not using the right keywords. I'm using the latest rails. On my view I have a table generated by rails. People are able to a开发者_运维问答dd content to that table by sending a rails form. I want this table to be updated with newly updated values, without having to refresh the page. For example, if user 1 sent the rails form and added a new value to the database, I want user 2 to see this update without having to refresh the page.


I would highly suggest watching the Polling for Changes - Railscast that covers exactly what you are looking for.

This essentially will cover how to use jQuery to poll the server to see if there are any changes, and apply them to the page without refreshing(ajax).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜