Indicate to an ajax process that the delayed job has completed

后端 未结 3 2107
小蘑菇
小蘑菇 2020-12-15 00:25

I have a Rails 3 app that uses delayed_job to fetch some data (with a class method) when the user hits the page. How can I indicate to the ajax process that the class method

3条回答
  •  时光说笑
    2020-12-15 00:36

    If you are using any JavaScript framework like prototypejs, then in the optional options hash, you usually provide a onComplete and/or onSuccess callback. API Reference

提交回复
热议问题