मैं अब भ्रमित हो, मैं हटाने के बारे में/एक में शामिल होने तालिका में एक रिकॉर्ड को नष्ट नहीं जानता:रेल में, वास्तविक रिकॉर्ड को हटाने के साथ 'टेबल आइटम में शामिल हों' को कैसे नष्ट करें?
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.
क्या मैं अगर मैं कर सकते हैं बस संबंध आइटम को नष्ट करना चाहते हैं?