在 Rails 3.2 中,我有一个用户模型如下->
User model
has_many :billing_invoices, :through => :user_purchases, :select => "DISTINCT billing_invoices.invoice_date,billing_invoices.account_number"
我正在尝试升级到 Rails 4.0,但我收到了弃用警告,改为使用范围块。如何重写这个 has_many 语句以在 4.0 中工作?