« ActiveRecordでデフォルトの並び順を指定 | メイン | rails で model の変更を監視するプラグイン »

acts_as_paranoid でエラー

[rails] [plugin]

ActiveRecord 削除フラグで削除するプラグインの続き

rails 1.2.5 で、acts_as_paranoid を使うとエラー発生


NoMethodError (undefined method `construct_count_options_from_args' for User:Class):

などと怒られる。rails のバージョンアップが影響しているみたい。


          def count_with_deleted(*args)
            #calculate_with_deleted(:count, *construct_count_options_from_args(*args))
            calculate_with_deleted(:count, *construct_count_options_from_legacy_args(*args))
          end

上記のように修正すると動きます。

トラックバック

このエントリーのトラックバックURL:
http://i-am.web777.net/mt/mt-tb.cgi/37

コメントを投稿