Rails3插件—rake任务的加载环境。

时间:2020-12-08 01:16:11

What should I do to load rails models for rake task which is part of my plugin?

我应该做什么来加载rake任务的rails模型,这是我的插件的一部分?

1 个解决方案

#1


34  

Require the :environment rake task to run before it.

要求:environment rake任务在它之前运行。

task :my_task => :environment do

end

#1


34  

Require the :environment rake task to run before it.

要求:environment rake任务在它之前运行。

task :my_task => :environment do

end