我正在将ActiveAdmin应用到我的应用程序中。
在用户模型上,我有以下几种:
has_many :payments, :through => :ownerships, :source => :payment
has_many :subscription_payments, :through => :ownerships, :source => :payment, :conditions => "ownerships.buyable_type = 'Subscription'"
只要我将User添加到ActiveAdmin,我就会收到以下错误:
Mysql2::Error: Unknown column 'ownerships.buyable_type' in 'where clause': SELECT `payments`.* FROM `payments` WHERE (ownerships.buyable_type = 'Subscription')
有什么想法吗?我坚持这个。