2016-02-18 69 views
1

我使用Rails的審定寶石,和現在用的是相關的審計,像這樣:與軌多重協會審定

audited allow_mass_assignment: true, associated_with: :protocol 

的問題是,我需要這個特定型號的審覈,與一個以上的關聯楷模。我希望這樣的事情會起作用:

audited allow_mass_assignment: true, associated_with: [:protocol, :patient] 

但它沒有。 它提供了一個明確的錯誤,指出:

[:protocol, :patient] is not a symbol nor a string 

唯一related page我能找到索賠那簡直是不可能的,但它是很老,我希望有一些解決方法。

任何幫助一如既往的讚賞。

回答

1

沒有測試它,但嘗試在獨立的線路,如:

audited allow_mass_assignment: true, associated_with: :protocol 
audited allow_mass_assignment: true, associated_with: :patient 
0

對於任何搜索,如果你可以使用associated_with與多個協會,目前that is not possible

雖然有人提交了PR,但它沒有按預期工作。