【发布时间】:2013-04-14 16:07:55
【问题描述】:
注意一切都在本地环境中正常工作
这是代码
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 并且它在本地工作......那么这里发生了什么?
【问题讨论】:
标签: ruby-on-rails-3 heroku crash dependent-destroy