RESTfully destroy polymorphic association in Rails?
问题 How do I destroy the association itself and leave the objects being associated alone, while keeping this RESTful? Specifically, I have these models: class Event < ActiveRecord::Base has_many :model_surveys, :as => :surveyable, :dependent => :destroy, :include => :survey has_many :surveys, :through => :model_surveys end class ModelSurvey < ActiveRecord::Base belongs_to :survey belongs_to :surveyable, :polymorphic => true end class Survey < ActiveRecord::Base has_many :model_surveys end That's