jeudi 1 octobre 2015

Simple_form_for check box is not appearing in rails

I have a system where there could be many roles in this system so i lets all the roles with an extra check box option but the problem is that the checkboxes doesn't appear here is the code :

<h1>الادوار المتاحه</h1>
<table class="table" >
     <tr>
          <th style="text-align: right;">الدور</th>
          <th style="text-align: right;">يعمل علي عربيه اسعاف</th>
      </tr>
<% @jobs.each do |role| %>
<tr>
<td><%=role.name%></td>
<% simple_form_for :jobs , :url => {:action => :update} do |f|%>
<td>
<%= f.input :ambu, label: "يعمل عل سياره اسعاف؟", as: :boolean, :input_html => {:checked => role.ambu}%>
</td>
<%end%>
</tr>
<% end %>
</table> 

Aucun commentaire:

Enregistrer un commentaire