开发者

rake task with easy interface

开发者 https://www.devze.com 2023-01-26 17:40 出处:网络
Right now I can do rake report shipment_id=5 rake report do id = ENV[\'shipment_id] end However I want to simplify the interace to the user by having

Right now I can do

rake report shipment_id=5

rake report do
  id = ENV['shipment_id]
end

However I want to simplify the interace to the user by having

rake report 5

How do I do that in rake?

Last resort would be to use ruby and then call rake internally but I want to 开发者_StackOverflow中文版check if I am missing some feature of rake?


This could be useful: Rails Rake: How to pass in arguments to a task with :environment

Although its only for newer versions of rake.

0

精彩评论

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