2009-01-07 60 views
2

我的应用程序在rails 1.2.6上,我希望将其升级到2.2 我在日志中看到此警告: DEPRECATION警告:服务已弃用,将从Rails 2.0中删除请参阅http://www.rubyonrails.org/deprecation了解详情。 (从application.rb中....叫:14)Rails 1.2“服务已弃用”

该生产线的问题是 服务:通知

有人可以告诉我什么服务会因为我无法找到任何这文档。

回答

6

service是一种指定控制器依赖关系的方法。依赖加载已移入ActiveSupport。

从1.2.0代码:

# Specifies a variable number of services that this controller depends on. 
    # Services are normally singletons or factories, like 
    # Action Mailer service or a Payment Gateway service. 
    def service(*services) 
    require_dependencies(:service, services) 
    depend_on(:service, services) 
    end 
    deprecate :service 
+0

所以我干脆删除此行,它会工作或我需要做些额外的事情? – Sanjay 2009-01-08 12:34:43