<% if task.done %>
или <% unless task.done %>
<% @tasks.each do |task| %>
<% if task.done %>
<tr>
<td><%= link_to task.name, edit_task_path(task) %></td>
<td><%= task.done %></td>
<td><%= link_to 'Show', task %></td>
<td><%= link_to 'Destroy', task, method: :delete, data: {confirm: 'Are you sure?'} %></td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
<br>
z.do_request(method="host.create",params= {
"host": "blablalbalba",
"interfaces": [
{
"type": 1,
"main": 1,
"useip": 1,
"ip": "ip",
"dns": "",
"port": "10050"
}
],
"groups": [
{
"groupid": "37"
}
],
"templates": [
{
"templateid": "10104"
}
],
}
)