I have a Rails task: should I use script/runner or rake?

后端 未结 8 600
萌比男神i
萌比男神i 2020-12-07 16:08

For ad hoc Rails tasks we have a few implementation alternatives, chief among which would seem to be:

script/runner some_useful_thing
8条回答
  •  北荒
    北荒 (楼主)
    2020-12-07 17:09

    For one off commands script/runner can be fine. For anything repeated, a rake task is easier in the long-run, and has a summary if you forget what it does.

提交回复
热议问题