2010-07-02 64 views
5

我看到警告:Rails3中:基本#after_update已棄用

after_update :your_custom_method # macro-style 

在:

DEPRECATION WARNING: Base#after_update has been deprecated, please use Base.after_update :method instead. (called from <class:City> at /home/petrushka/webdev/my_app/app/models/city.rb:4) 

我應該寫的,而不是

def after_update 
    .... 
    end 

回答