<%= search_form_for @q,url:tests_start_path do |f| %> <%= f.label :title_cont, 'タイトル' %> <%= f.text_field :title_cont %> <%= f.label :user_name_cont,"作者"%> <%= f.text_field :user_name_cont%> <%= f.label :question_cont,"問題"%> <%= f.text_field :question_cont%> <%= f.label :answer_cont,"答え"%> <%= f.text_field :answer_cont%> <%= button_tag :type => "submit", :class =>"btn btn-send",id:"maintain" do %> <i class="material-icons left">search</i>検索 <% end %> <%end%> <div class="col-md-12"> <%= render "layouts/tabs_menu"%> <%= form_tag action: :ready do %> <%=render "words/words_index"%> <p>テストのオプション(通常or練習)</p> <%= select_tag 'test_option', options_for_select(["通常", "練習"]) %><br> <p>テストのモード(選択or入力)</p> <%= select_tag 'test_mode', options_for_select(["選択", "入力"]) %><br> <p>テストのオプション(通常or反転)</p> <%= select_tag 'option', options_for_select(["通常", "反転"])%> <%= submit_tag "テストスタート" , class:"btn btn-large btn-primary"%> <% end%> <p>練習モードの場合、正答が問題文に表示されます</p> </div>
#words/words_index <td><%= check_box_tag "words_info[]",word.id,@words_info==word.id,{id:id,class:"check_box"}%><label for="<%=id%>" >追加</label></td>
検索フォームを押したときにチェックボックスのチェックされているデータを検索フォームのパラメータとして送信したい
##試したこと
path(params[:words_info])
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。