开发者

task :something => :environment

Can someone explain me what happens when 开发者_如何转开发I add such dependency to my tasks? Which files are loaded etc.?


All this dependency does is requiring your config/environment.rb file, ie. loading the entire Rails environment. You can do this whenever you need to use any code from your application in the rake tasks (ie. models), which is quite common.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜