注意一切都在当地环境中工作
这是代码
PublicActivity::ORM::ActiveRecord::Activity.class_eval do
attr_accessible :reference_type, :reference_id
has_many :notifications, :dependent => :destroy_all
has_many :users, :through => :notifications
end
这是 public_activity gem
错误是
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/builder/has_many.rb:20:in `configure_dependency': The :dependent option expects either :destroy, :delete_all, :nullify or :restrict (:destroy_all) (ArgumentError)
如果它期望:destroy_all
并且我写:destroy_all
并且它在本地工作..那么这里发生了什么?