Run rake task in controller

后端 未结 4 1431
情话喂你
情话喂你 2020-11-28 04:33

I\'d like to run a rake task in my controller. Is there any way to do this?

4条回答
  •  旧巷少年郎
    2020-11-28 05:00

    You can do this in your controller:

    %x[rake name_task]
    

    with: name_task is the name of your task

提交回复
热议问题