【发布时间】:2018-07-17 15:46:29
【问题描述】:
我有一个 Rails 5 应用程序,我想在父记录被销毁时销毁标签。我正在尝试做类似的事情:
class Job < ApplicationRecord
acts_as_taggable_on :jobs, dependent: :destroy
...
当我这样做时,我得到了错误:
undefined method `to_sym' for {:dependent=>:destroy}:Hash Did you mean? to_s to_set
documentation for acts-as-taggable-on 没有明确表示可以使用dependent::destroy,但this issue 让我觉得可以。
【问题讨论】:
标签: ruby-on-rails acts-as-taggable-on