2
我無法檢索auditable_type
的子表記錄關聯審計,因爲它總是給出父表類名稱。SIT in rails for audited-activerecord
我:
class Patient < ActiveRecord::Base
has_many :diseases
has_associated_audits
end
class Disease < MedicalHistory
belongs_to :patient
audited associated_with :patient
end
class MedicalHistory < ActiveRecord::Base
end
當我提出Patient.last.associated_audits.last.auditable_type
給MedicalHistory,而不是疾病。
請讓我知道盡快。
如果刪除ASAP,那就太好了。我們的堆棧將始終如一地幫助您 – Jaswinder
如果您訪問gem的站點,您將不會發現提及單表繼承功能。你聲稱的是「不工作」我會假設維護者/管理員不會做廣告的功能。它是開源軟件,您應該考慮分叉庫並製作它以滿足您的需求。 – Tass