LoginSignup
2
2

More than 5 years have passed since last update.

Rails4で_run_save_callbacksの書き方が変更された

Posted at

Rails4にバージョンアップしたところ_run_save_callbacksでエラーになった

エラー。, undefined method `_run_save_callbacks' for #
2015/11/19 13:20:24 [INFO] ::
        /poge/hoge/.rbenv/versions/2.2.3/gemsets/4.0/gems/activemodel-4.0.13/lib/active_model/attribute_methods.rb:439:in `method_missing'
        /poge/hoge/workspace/version/app/pogeapl/lib/my_base/base.rb:333:in `method_missing'

書き方がかわったらしい、以下のように変更すると動くようになる

-      _run_save_callbacks do
+      run_callbacks :save do

参考

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2