2009-01-07 32 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