ruby on rails - Dependent destroy not working for STI class -
i facing issue when trying destroy using nested attribute sti classes in rails 4. eg:
class < activerecord::base end class b < has_many :options accepts_nested_attributes_for :options, :allow_destroy => true end when try delete options not being deleted event has marked_for_destruction? true, option not being deleted.
i have correct paramaters accessible :id, :name, :_destroy.
i made working moving nested attributes code , has_many base class.
class < activerecord::base has_many :options accepts_nested_attributes_for :options, :allow_destroy => true end class b < end i think issue sti in rails same can not update type of sti class object(there workaround fix that).
Comments
Post a Comment