tôi nhận nhầm lẫn bây giờ, tôi không biết làm thế nào để xóa/hủy một bản ghi trong một bảng tham gia:Trong đường ray, làm thế nào để phá hủy một 'tham gia mục bảng' với ra xóa các hồ sơ thực sự?
class Task < ActiveRecord::Base
belongs_to :schema
belongs_to :to_do
end
class Todo < ActiveRecord::Base
belongs_to :schema
has_many :tasks
end
class Shcema < AcitveRecord::Base
has_many :todos
has_many :tasks, :through => :todos
end
>> sc = Schema.new
>> sc.tasks << Task.new
>> sc.tasks << Task.new
>> sc.tasks << Task.new
...
>> sc.tasks.delete(Task.first) # I just want to delete/destroy the join item here.
# But that deleted/destroyed the Task.first.
tôi có thể làm gì nếu tôi chỉ muốn phá hủy mục quan hệ?