次のような Doctors と Questions の 2 つのモデルがあります。
ドクターモデル
class Doctor < ActiveRecord::Base
has_many :questions
has_many :brands
accepts_nested_attributes_for :questions
end
質問モデル
class Question < ActiveRecord::Base
belongs_to :discipline  
belongs_to :doctor
belongs_to :brand
end
これで、Doctor には多くの質問とブランドがあり、質問は Doctor と Brand に属していることがはっきりとわかります。以前に保存した質問を医師の編集ページから医師に追加したいと考えています。それらも削除したいのですが、どうすればよいですか?
私は次のように試しました:
<%= form.fields_for :questions, question,:child_index => (question.new_record? ? "index_to_replace_with_js" : nil) do |question_form| %>
  <table>
    <tr>
      <td>
        <div class="label">Select Question</div>
        <%= question_form.collection_select :id, Question.all, :id, :title ,{:include_blank => true } %>
      </td>          
    </tr>
  </table>
しかし、これは私にはうまくいきません。適切な例で解決策を教えてもらえますか?