我的模型架构:
用户
has_many :activities
has_many :companies through: :activities
公司
has_many :activities
has_many :users, through: :activities
活动
belongs_to :user
belongs_to :company
当我尝试运行时出现问题,或者current_user.activities.delete_all(["company_id=?", params[:id]])
我收到此错误:clear
destroy
ArgumentError: wrong number of arguments (1 for 0)
from /home/rom/.rvm/gems/ruby-1.9.3-p194@rails-3.2.8/gems/activerecord-3.2.8/lib/active_record/associations/collection_association.rb:156:in `delete_all'
from /home/rom/.rvm/gems/ruby-1.9.3-p194@rails-3.2.8/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:46:in `delete_all'