springhackathon/harmox-user

View on GitHub
app/views/bot/bots/edit.html.erb

Summary

Maintainability
Test Coverage
<div class="container">

  <h2>BOTの編集</h2>
  <%= form_for @bot, :url => {:action => 'update'} do |f| %>
    <%= f.label :hash_tags %>
    <br>
    <table class="table table-striped table-bordered table-condensed">
      <tr>
        <th>Q</th>
        <th class="question">BOTに関連するHashTagを選んでください。</th>
        <th>入力項目</th>
      </tr>
      <tr>
        <td class="center">1</td>
        <td>ハッシュタグを選んでください。</td>
        <td><%= select_tag :hash_tags, options_from_collection_for_select(HashTag.all, :id, :hash_tag), :multiple => true, class: :"form-control" %></td>
      </tr>
      <tr>
        <td class="center">2</td>
        <td>曜日を選んでください。</td>
        <td><%= select_tag :weekday, options_for_select({"月曜日" => "0", "火曜日" => "1", "水曜日" => "2", "木曜日" => "3", "金曜日" => "4", "土曜日" => "5", "日曜日" => "6"}), class: :"form-control" %></td>
      </tr>
      <tr>
        <td class="center">3</td>
        <td>時間を選んでください。</td>
        <td><%= select_tag :hour, options_for_select(0..23), class: :"form-control time_select" %>:00</td>
      </tr>
    </table>
    <%= f.submit "登録", class: 'btn btn-info' %>
  <% end %>
</div>