【发布时间】:2016-05-30 19:34:33
【问题描述】:
我正在为 Rails 使用 Audited gem,并且正在使用相关的审计,如下所示:
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 声称这根本不可能,但它已经很老了,我希望有一些解决方法。
一如既往地感谢任何帮助。
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-4 acts-as-audited