Rails3 plugin - load environment for rake task

前端 未结 1 1282
别跟我提以往
别跟我提以往 2021-01-07 22:54

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

相关标签:
1条回答
  • 2021-01-07 23:08

    Require the :environment rake task to run before it.

    task :my_task => :environment do
    
    end
    
    0 讨论(0)
提交回复
热议问题