在事件后运行服务器端 Ruby 代码

You can adapt this example to your needs.